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

Merge branch '2021.0.0_1068586_CompanyContactReadonly_mw' into '2021.0.0'

[Projekt: Entwicklung - xRM][TicketNr.: 1068586][Firma bei Kontakt readonly,...

See merge request xrm/basic!612
parents 7726e7fa 8bc3f9f0
No related branches found
No related tags found
No related merge requests found
......@@ -913,6 +913,7 @@
<title>Company</title>
<consumer>Organisations</consumer>
<linkedContextProcess>%aditoprj%/entity/Person_entity/entityfields/organisation_contactid/linkedContextProcess.js</linkedContextProcess>
<stateProcess>%aditoprj%/entity/Person_entity/entityfields/organisation_contactid/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/Person_entity/entityfields/organisation_contactid/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Person_entity/entityfields/organisation_contactid/displayValueProcess.js</displayValueProcess>
<onValidation>%aditoprj%/entity/Person_entity/entityfields/organisation_contactid/onValidation.js</onValidation>
......
import("Context_lib");
import("system.vars");
import("system.result");
import("Entity_lib");
import("system.neon");
if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT) {
var currentContext = ContextUtils.getCurrentContextId();
var contactId = vars.get("$field.CONTACTID");
var linkedObject = new HasLinkedObjectTester()
.andNoEntityRows("Activity_entity", "LinkedObjects", {ObjectId_param : currentContext, RowId_param : contactId})
.andNoEntityRows("360Degree_entity", "PersonObjects", {ObjectRowId_param : contactId , ObjectStatus_param : vars.get("$field.STATUS")})
.andNoEntityRows("ObjectTree_entity", "TreeProvider", {ObjectIds_param : [vars.get("$field.CONTACTID"), vars.get("$field.PERSON_ID")], ObjectTypes_param : currentContext})
//.andNoEntityRows("AttributeRelation_entity", "TreeProvider", {ObjectRowId_param : contactId, ObjectType_param : currentContext})
//.andNoEntityRows("DistrictResponsible_entity", "OrganisationResponsibles", {OrgUid_param : vars.get("$field.ORGANISATION_CONTACTID")}) //District Responsible and Object Tree is default data record
.andNoEntityRows("Document_entity", "Documents", {AssignmentRowId_param : contactId, AssignmentTable_param : "RELATION"})
.validate()
if(!linkedObject)
result.string(neon.COMPONENTSTATE_READONLY);
}
\ 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