Answered MDS2012 - Parent Child Business Rule

  • Friday, April 13, 2012 9:40 AM
     
     

    I am working with MDS2012. 
    I have a parent entity with a flag attribute (Yes/No), and a child entity belonging to that parent entity.
    I have to implement a business rule that say: if the flag is set to Yes in parent entity, the name must be filled-in in child entity.
    No problem to implement it on child entity: if DBA.ParentEntity.Flag is equal to Y then Name is required.
    But how can I implement it on the parent entity ?  So if the flag is set to Yes in the parent entity, all related child members must trigger the validation.

All Replies

  • Thursday, April 19, 2012 1:19 PM
     
     Answered

    Hi Guillaume,

    Try this.

    1. Add a Flag attribute to the child entity.  You can hide this attribute if you like with permissions or not including it in attribute groups.

    2. Add a rule on the child entity to populate the Flag attribute from the parent entity: Flag equals DBA.ParentEntity.Flag

    3. Add a name required rule on the child entity: If Flag = Yes Then Name is Required.  Make sure this rule's priority is after the rule above.

    Now, because of rule #2, when the parent entity Flag value changes it will trigger that the child entities need to be revalidated.

    HTH,


    Brian Barnett
    http://www.profisee.com
    brian.barnett@profisee.com
    “As the original creators of Microsoft MDS, Profisee's Master Data Maestro provides a range of enterprise-grade functionality to ensure MDS project success.”

  • Thursday, April 19, 2012 2:49 PM
     
     

    Hi Brian,

    Thanks a lot for this workaround.

    Is it also possible to trigger the validation of the children instead of just flagging them "to be revalidated" ?

  • Thursday, April 19, 2012 4:27 PM
     
     
    What MDS does when the rule in #2 is in place is it sees you have a rule in place that uses a value from a parent entity therefore it will cause the validation status of the related child records to be set to 'Revalidate' thus the next time business rules (validation) is run these will be processed.  So, yes, they should get revalidated.

    Brian Barnett
    http://www.profisee.com
    brian.barnett@profisee.com
    “As the original creators of Microsoft MDS, Profisee's Master Data Maestro provides a range of enterprise-grade functionality to ensure MDS project success.”