Skip to main content
Dynamics 365 general forum
Suggested answer

How can I validate that a child record is added before user can move onto the next stage

editSubscribe (0) ShareShare
ReportReport
Posted on by 190

How can i make sure that a child record has been entered before a field can be displayed on the parent form?

I have a purchase order form, where some info is entered and saved before the child form subgrid is shown.  Then I want to make sure that a related child record (purchase detail) is entered and saved before the "complete" field is shown on the main form.  Then when user selects complete and saved, the user can move on to the next stage in a BPF.  

I believe this would need to be done with javascript or plugin. I would prefer JS if anyone has a solution.  Even better if this can be done without any customization.  Thanks. 

Attachments
  • bp3378 Profile Picture
    bp3378 190 on at
    RE: How can I validate that a child record is added before user can move onto the next stage

    Thanks I will take a look at the links.  

  • Suggested answer
    Community Member Profile Picture
    Community Member UG Leader on at
    RE: How can I validate that a child record is added before user can move onto the next stage

    Hi bp3378,

    There is no OOB way to achieve this. You can use the addOnPreStageChange to do this. Here is a blog about it: Dynamics BPF Javascript: NEW onPreStageChange Handler! (richardawilson.com) 

    And you need to check the count of child record: How to get the total record count of a grid in Dynamics 365? - CRM Crate

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,080 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,601 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Featured topics

Product updates

Dynamics 365 release plans