Skip to content
Snippets Groups Projects
Commit 3df4189d authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Merge branch '2003550_attributeCreationBug' into '2021.2'

2003550 new/edit attribute fix child attributes validation

See merge request xrm/basic!1620
parents 6ed718d3 9348db6c
No related branches found
No related tags found
No related merge requests found
import("Sql_lib");
import("system.util");
import("system.db");
import("system.neon");
import("system.vars");
import("Context_lib");
import("Attribute_lib");
import("Entity_lib");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW
var recordstate = vars.get("$sys.recordstate");
if(recordstate == neon.OPERATINGSTATE_NEW
&& vars.get("$field.ATTRIBUTE_TYPE").trim() != AttributeTypes.COMBOVALUE()
&& vars.exists("$param.AttrParentId_param") && vars.get("$param.AttrParentId_param"))
{
......@@ -25,4 +25,10 @@ if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW
"OBJECT_TYPE" : usage
});
});
}
if (recordstate == neon.OPERATINGSTATE_NEW || recordstate == neon.OPERATINGSTATE_EDIT)
{
//when the consumer is invisible and there is a empty row it can mess up the validation
EntityConsumerUtils.rmInsertedConsumerRows("ChildAttributes");
}
\ 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