Skip to content
Snippets Groups Projects
Commit ca1cf4a4 authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon: Committed by Sebastian Pongratz
Browse files

[Projekt: xRM-Sales][TicketNr.: 1086372][Gebietsdefinitionen durch asynchrone...

[Projekt: xRM-Sales][TicketNr.: 1086372][Gebietsdefinitionen durch asynchrone Ausführung / Speicherung fehleranfällig (Timing Problem)]
parent f929b46d
No related branches found
No related tags found
No related merge requests found
......@@ -1425,6 +1425,10 @@
</entityParameter>
</children>
</entityConsumer>
<entityParameter>
<name>IsQuickEntry_param</name>
<expose v="true" />
</entityParameter>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.logging");
import("system.vars");
import("District_lib");
import("system.neon");
if (vars.get("$local.recordstate") == neon.OPERATINGSTATE_NEW)
if (vars.get("$local.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$param.IsQuickEntry_param"))
{
//Assign this new organisation to all according districts with auto assignment is true
//2nd parameter "undefined" means, that the current user is determined in the function
......
......@@ -5,6 +5,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/QuickEntry_entity/documentation.adoc</documentation>
<onValidation>%aditoprj%/entity/QuickEntry_entity/onValidation.js</onValidation>
<afterSave>%aditoprj%/entity/QuickEntry_entity/afterSave.js</afterSave>
<iconId>VAADIN:BOLT</iconId>
<recordContainer>jdito</recordContainer>
<entityFields>
......
import("District_lib");
import("system.vars");
var entityDate = vars.get("$local.entitydata");
if(entityDate["ORGANISATION_NAME"])
{
//Assign this new organisation to all according districts with auto assignment is true
//2nd parameter "undefined" means, that the current user is determined in the function
DistrictUtils.assignDistrictOnServer([], undefined, entityDate["#UID"])
}
\ No newline at end of file
......@@ -15,7 +15,8 @@ if (rowdata["ORGANISATION_NAME.value"])
{
let configOrg = entities.createConfigForAddingRows();
organisationId = rowdata["ORGANISATION_ID.value"];
configOrg.entity("Organisation_entity");
configOrg.entity("Organisation_entity")
.addParameter("IsQuickEntry_param", true);
configOrg.fieldValues({
"ORGANISATIONID": organisationId,
"ORGANISATION_ID": organisationId,
......
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