Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How can I validate records exist in a related records subgrid?

(0) ShareShare
ReportReport
Posted on by 95

I am just getting started on Model Driven apps. I am creating an an app where users are requesting a new client be setup. I have a related table within a subgrid on the form where they can add contact information. Before the request can be submitted or moved to the next stage we require at least an email address and phone number. How can I validate this and possibly show a message to the user?

  • Suggested answer
    Best soundbar Profile Picture
    Best soundbar 10 on at
    RE: How can I validate records exist in a related records subgrid?

    Hey thanks for the super helpful reply. I'm not sure how I missed that thread. I haven't quite mastered the search function on here. I think I'll pass with him this time around. If i want any further guideline we will contact you here
    https://community.dynamics.com/365/f/best-soundbar/dynamics-365-general-forum/p/1272457/

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    RE: How can I validate records exist in a related records subgrid?

    Hi,

    I think you can register your plugin on your Business process flow Entity and check if record exist in Related entity .

    Every BPF will have corresponding custom entity created by the system.

    Stage field can be used to identify the current stage.

    Lookup to your main Entity field will be used to validate related entity record.

  • MikeFarrant Profile Picture
    MikeFarrant 7 on at
    RE: How can I validate records exist in a related records subgrid?

    I have the same problem - I realise this was a while ago but did you ever find a solution?

  • mykedeabreu Profile Picture
    mykedeabreu 95 on at
    RE: How can I validate records exist in a related records subgrid?

    None of the suggestions are clear to me. 

  • Torrado Profile Picture
    Torrado 1,270 on at
    RE: How can I validate records exist in a related records subgrid?

    Hello Myke,

    Do you need additional help? Any news?

    If it's already clarified, and the answer was helpful, could you please mark it as verified? That will help others in future.

    Thanks

  • Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: How can I validate records exist in a related records subgrid?

    You can validate record counts using skd or javascript (retrievemulitple request )and can validate based on the related records counts.

  • Suggested answer
    Ran Zhang Profile Picture
    Ran Zhang on at
    RE: How can I validate records exist in a related records subgrid?

    Hi,

    May I know if you tried using Business Process Flow to verify if an email address and phone number are entered?

    Please refer to this post community.dynamics.com/.../is-it-possible-to-display-a-warning-message-on-bpf-when-a-field-value-is-not-entered.

  • Suggested answer
    Torrado Profile Picture
    Torrado 1,270 on at
    RE: How can I validate records exist in a related records subgrid?

    Hello

    If I understood your scenario, you want to validate if the main record contains at least one contact information record associated and, if it doesn't, prevent the user to move to the next stage.

    You can perform that validation by using a synchronous Workflow (extending with Custom Workflow Activity to check if the main record contains the related records) or a synchronous Plug-in (on PreValidation stage).

    Hope this helps you.

    Please mark the answer as verified if helpful.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,703 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,433 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans