Skip to content
Snippets Groups Projects
Commit 08b7601d authored by Heinz Boesl's avatar Heinz Boesl
Browse files

Error when creating from 360 degrees

parent 0deddfc3
No related branches found
No related tags found
No related merge requests found
Showing
with 27 additions and 8 deletions
......@@ -47,6 +47,10 @@
<valueProcess>%aditoprj%/entity/360Degree_entity/entityfields/organisationobjects/children/objecttype_param/valueProcess.js</valueProcess>
<expose v="false" />
</entityParameter>
<entityParameter>
<name>BaseContextId_param</name>
<valueProcess>%aditoprj%/entity/360Degree_entity/entityfields/organisationobjects/children/basecontextid_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityProvider>
<entityField>
......@@ -86,6 +90,10 @@
<valueProcess>%aditoprj%/entity/360Degree_entity/entityfields/personobjects/children/objecttype_param/valueProcess.js</valueProcess>
<expose v="false" />
</entityParameter>
<entityParameter>
<name>BaseContextId_param</name>
<valueProcess>%aditoprj%/entity/360Degree_entity/entityfields/personobjects/children/basecontextid_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityProvider>
<entityField>
......@@ -156,6 +164,10 @@
<groupable v="true" />
<dropDownProcess>%aditoprj%/entity/360Degree_entity/entityfields/active/dropDownProcess.js</dropDownProcess>
</entityField>
<entityParameter>
<name>BaseContextId_param</name>
<expose v="true" />
</entityParameter>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......
......@@ -5,5 +5,5 @@ if (vars.get("$param.BaseContextId_param") == "Person" || vars.get("$param.BaseC
{
// Note: this only works if the BaseContextId_param is also the correct Tablename. If not you have to add a context - tablename mapping somewhere...
// for person / organisation this should work
CampaignUtils.addParticipantsByRowIds(JSON.stringify([vars.getString("$param.ObjectRowId_param")]), vars.get("$param.BaseContextId_param").toUpperCase());
CampaignUtils.addParticipantsByRowIds(JSON.stringify([JSON.parse(vars.get("$param.ObjectRowId_param"))[0]]), vars.get("$param.BaseContextId_param").toUpperCase());
}
\ No newline at end of file
import("system.vars");
import("Contract_lib");
ContractUtils.createNewContract(vars.getString("$param.ObjectRowId_param"));
\ No newline at end of file
ContractUtils.createNewContract(JSON.parse(vars.getString("$param.ObjectRowId_param"))[0]);
\ No newline at end of file
import("system.vars");
import("Offer_lib");
OfferUtils.createNewOffer(null, null, vars.getString("$param.ObjectRowId_param"));
\ No newline at end of file
OfferUtils.createNewOffer(null, null, JSON.parse(vars.getString("$param.ObjectRowId_param"))[0]);
\ No newline at end of file
import("system.vars");
import("Order_lib");
OrderUtils.createNewOrder(null, vars.getString("$param.ObjectRowId_param"));
\ No newline at end of file
OrderUtils.createNewOrder(null, null, JSON.parse(vars.get("$param.ObjectRowId_param"))[0]);
import("system.vars");
import("Salesproject_lib");
Salesproject.createNewSalesproject(vars.getString("$param.ObjectRowId_param"));
\ No newline at end of file
Salesproject.createNewSalesproject(JSON.parse(vars.getString("$param.ObjectRowId_param"))[0]);
\ No newline at end of file
......@@ -3,4 +3,4 @@ import("ActivityTask_lib");
import("Context_lib");
import("Ticket_lib")
TicketUtils.createNewTicket(undefined, [[vars.get("$param.BaseContextId_param"), vars.get("$param.ObjectRowId_param")]])
\ No newline at end of file
TicketUtils.createNewTicket(undefined, [[vars.get("$param.BaseContextId_param"), JSON.parse(vars.get("$param.ObjectRowId_param"))[0]]])
\ No newline at end of file
import("system.result");
result.string("Organisation");
\ No newline at end of file
import("system.result");
result.string("Person");
\ No newline at end of file
......@@ -2,9 +2,10 @@ import("Sql_lib");
import("system.vars");
import("system.result");
var contactids = newSelect( "CONTACTID" )
var person_contactids = newSelect( "CONTACTID" )
.from("CONTACT")
.where("CONTACT.ORGANISATION_ID", vars.getString("$field.ORGANISATIONID"))
.and("CONTACT.PERSON_ID is null")
.arrayColumn();
result.string( JSON.stringify(contactids) );
\ No newline at end of file
result.string( JSON.stringify([vars.getString("$field.CONTACTID")].concat(person_contactids)) );
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment