Skip to content
Snippets Groups Projects
Commit cafe5bf2 authored by S.Listl's avatar S.Listl
Browse files

Bugfixes in ObjectRelation and Order

parent 7071e369
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,6 @@
</entityProvider>
<entityField>
<name>UID</name>
<valueProcess>%aditoprj%/entity/ObjectRelationType_entity/entityfields/uid/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>SOURCE_RELATION_TITLE</name>
......
import("system.util");
import("system.vars");
import("system.result");
import("system.neon");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
result.string(util.getNewUUID());
\ No newline at end of file
......@@ -5,6 +5,7 @@ import("system.vars");
import("system.db");
import("system.util");
var rowData = vars.get("$local.rowdata");
var newRelationType = util.getNewUUID();
db.insertData("AB_OBJECTRELATIONTYPE", [
......@@ -16,17 +17,17 @@ db.insertData("AB_OBJECTRELATIONTYPE", [
"HIERARCHY",
"ICON"
], null, [
util.getNewUUID(),
vars.get("$field.SOURCE_OBJECT_TYPE"),
vars.get("$field.SOURCE_RELATION_TITLE"),
rowData["UID.value"],
rowData["SOURCE_OBJECT_TYPE.value"],
rowData["SOURCE_RELATION_TITLE.value"],
newRelationType,
1,
vars.get("$field.HIERARCHY"),
vars.get("$field.ICON") // Icon is only savid in type1
rowData["HIERARCHY.value"],
rowData["ICON.value"] // Icon is only savid in type1
]);
if (vars.getString("$field.Type2Enabled_proxy") == "1"
&& vars.get("$field.SOURCE_RELATION_TITLE") != vars.get("$field.DEST_RELATION_TITLE"))
if (rowData["Type2Enabled_proxy.value"] == "1"
&& rowData["SOURCE_RELATION_TITLE.value"] != rowData["DEST_RELATION_TITLE.value"])
{
db.insertData("AB_OBJECTRELATIONTYPE", [
"AB_OBJECTRELATIONTYPEID",
......@@ -37,11 +38,11 @@ if (vars.getString("$field.Type2Enabled_proxy") == "1"
"HIERARCHY"
], null, [
util.getNewUUID(),
vars.get("$field.DEST_OBJECT_TYPE"),
vars.get("$field.DEST_RELATION_TITLE"),
rowData["DEST_OBJECT_TYPE.value"],
rowData["DEST_RELATION_TITLE.value"],
newRelationType,
2,
vars.get("$field.HIERARCHY")
rowData["HIERARCHY.value"]
]);
}
......
......@@ -9,7 +9,7 @@ if(vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param"))
cond.andIfSet("SALESORDER.CONTACT_ID", "$param.ContactId_param");
else {
cond.andIfSet("SALESORDER.OBJECT_ROWID", "$param.ObjectRowId_param")
.andIfSet("SALESORDEER.OBJECT_TYPE", "$param.ObjectType_param");
.andIfSet("SALESORDER.OBJECT_TYPE", "$param.ObjectType_param");
}
//TODO: use a preparedCondition (.build instead of .toString) when available #1030812 #1034026
result.string(cond.toString());
\ No newline at end of file
......@@ -37,10 +37,6 @@
<name>5a2ac432-6901-485b-ad84-8fbefa04217b</name>
<entityField>PROCESSDEFINITION_VERSION</entityField>
</entityFieldLink>
<entityFieldLink>
<name>7eaa1915-e378-4e7f-9df8-28bbc43930d2</name>
<entityField>PROCESSVARIABLES</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
......
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