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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to fetch the Missing Mandatory fields upon clicking on the submit button

(0) ShareShare
ReportReport
Posted on by

Hi

My Question is how to get alert on missing mandatory fields of entire entity and related entities also upon clicking on the submit button in the form.

dialog box should show with all the missing fields which are null. 

Example:

primary entity is Account and assume it mandatory fields are F1 and F2

related entity is customer and assume it mandatory fields are F3 and F4

 i need to write the code in JavaScript, any Help should be appreciated

Thanks 

Teja 

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    You can use the getRequiredLevel function to iterate through the attributes and identify the mandatory ones.

    I'm not sure what you expect with the related entities. In CRM a user will only be entering data for one entity at a time; they'd first create the primary entity (for which you can prompt with the required fields), then they would create related entities

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    you can't do it on related entities.

    To do it on the current form:

    1. you will need to create a list of all created fields

    2. Then go through this list and check the requiredLevel: msdn.microsoft.com/.../gg334409.aspx

    3. for each fields with the Required level "required", check if there is a value if not thow an error

    but all of this is normally already taken care by CRM

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans