Skip to content
Snippets Groups Projects
Commit 41b8851f authored by Sebastian Listl's avatar Sebastian Listl :speech_balloon:
Browse files

Merge branch '1057177_FixKeywordAttributesInUseLimitDelete' into '2020.1'

1057177 fix keyword attributes in use limit delete

See merge request xrm/basic!260
parents bcfb5557 8437dda7
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/KeywordAttribute_entity/documentation.adoc</documentation>
<title>Keyword Attribute</title>
<grantDeleteProcess>%aditoprj%/entity/KeywordAttribute_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/KeywordAttribute_entity/contentTitleProcess.js</contentTitleProcess>
<iconId>VAADIN:KEY_O</iconId>
<iconIdProcess>%aditoprj%/entity/KeywordAttribute_entity/iconIdProcess.js</iconIdProcess>
......
import("system.result");
import("Attribute_lib");
import("system.vars");
import("Sql_lib");
import("Entity_lib");
var id = vars.get("$field.AB_KEYWORD_ATTRIBUTEID");
var countSql = newSelect("count(*)")
.from("AB_KEYWORD_ATTRIBUTERELATION")
.where("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTE_ID", id)
var canDelete = new HasLinkedObjectTester()
.andSqlYieldsZero(countSql)
.andNoEntityRows("KeywordAttributeRelation_entity", "AttributesForKeywordEntry", {KeywordEntryId_param: id})
.validate();
result.string(canDelete);
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