Posts

Showing posts with the label massive changes on field appearance (visible

sharing a practice about massive changes on field appearance (visible, editable, mandatory) based on given rule(s) in Dynamics CRM

Hello, I needed to implement complex rules for the fields on a form by actors,stages and status for one of my Dynamics CRM delivery. for example; "Actor (User) A" should be able to change Field1,Field2,Field3...FieldN but not see Section1, Section2, Section3... SectionN and maybe Tab1, Tab2, Tab3 ... TabN must be readonly for Actor (User) A as long as the form is under Stage X with Status C. First of all, I define unique JSON object to cover fields rule which is going to be implemented in CRM Form. When a form is loaded, A client-side scripts will collect fields and rules than generate JSON object to push to the proper javascript method for making them visible, readonly or mandatory. Here is the structure of  the JSON object; {  *      "requiredfields": {  *              "controls": {  *                  "name": [  *                      // can be fields  *                     "Field_1",  *                     "Fie