web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Model-driven app (lock form)

(0) ShareShare
ReportReport
Posted on by 709

Hello everyone,

If I have table with relationship 1:N (Parent - Child), and I created form for the child entity, but I want to lock all the field by look up to its parent table's field, lets say in the parent has field "IsPosted". So when the parent's "IsPosted" is Yes, I want all the field in this child form to be lock, how to do that?

Can I cover this with Business Rule ? but I think business rule cannot lookup to another table, am I right to say that ?

Thanks in advance.

I have the same question (0)
  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at
    RE: Model-driven app (lock form)

    Hi, 

    Unfortunately this can't be implemented with a Business Rule because we can't check the values of the parent table.

    It can be implemented using JavaScript code.

  • ShaqAX Profile Picture
    709 on at
    RE: Model-driven app (lock form)

    Hi, is there any other way beside JavaScript code ?

    one with low coding ?

    Thanks

  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at
    RE: Model-driven app (lock form)

    I'm afraid this can only be implemented with a JavaScript code

  • ShaqAX Profile Picture
    709 on at
    RE: Model-driven app (lock form)

    Can I at least show the Parent's field in my child's form ?

    and basically how to do that, if it is possible.

    Thanks,

  • empath-e CRM Profile Picture
    1,136 on at
    RE: Model-driven app (lock form)

    I'm sure this can be achieved using Workflow, albeit with a lot more effort. I have done something similar before, I'm just digging it out now to see if it will work for you too

  • Verified answer
    empath-e CRM Profile Picture
    1,136 on at
    RE: Model-driven app (lock form)

    If you are familiar with Flows within Power Automate you should be able achieve this.

    For me I had created an Events Table (Parent) with an associated Event Attendees Table (Child) The Flow is designed so that if the Event Status = 'Event Full' this would deactivate the Event Table form fields and the Event Attendees form fields too.

    The below example will just deactivate the Child Table fields as per your request.

    (1) Create a Trigger on your Parent table setting your Filter Row to Trigger the Flow

    (2) Add the List Rows Action to retrieve the rows from the Child Table associated with the Parent Table

    (3) Finally add an Apply to each Action setting the Row ID to the Child Table Unique ID and both Status values to Inactive

    Event Attendee fields are now locked (as below) One thing you may have to do within your environment is to disable the Activate option if needed. I'm sure it is a lot easier if you can write JavaScript code as per meelamri 

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 123

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 101 Super User 2025 Season 2

#3
Erin Lubben Profile Picture

Erin Lubben 75

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans