Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Can you change the 'you must provide a value for...' to show the display name of the field?

Posted on by Microsoft Employee

Hi

Is it possible to change the 'you must provide a value for...' message to show the display name of the field that needs completing rather than the schema name? As in some cases the display name has been updated so it doesn't 100% replicate what the schema name is so those who are as familiar with Dynamics in our company are getting a bit confused?

Thanks

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Can you change the 'you must provide a value for...' to show the display name of the field?

    Hi

    The field isn't included in BPF it is included in the header section of the form. Assuming this is something that will also be resolved on a future release? Or is this different as it is just in the header not BPF.

    Thanks!

  • Verified answer
    LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: Can you change the 'you must provide a value for...' to show the display name of the field?

    Hi Jess,

    I'm sorry that this is an OOB feature and we could not change this message.

    But we are able to use JS to write a more detailed message instead.

    Please refer to the following code and trigger it at "OnSave" of the form.

    It is necessary to select "Pass execution context as first parameter" because we need to pass execution context to prevent saving the form.

    function checkField(executionContext){
        var fieldValue=Xrm.Page.data.entity.attributes.get("fieldname").getValue(); //get value from field
        if(fieldValue==""||fieldValue==null){
            Xrm.Page.ui.setFormNotification("fieldname is not completed", "ERROR"); 
            executionContext.getEventArgs().preventDefault();//prevent updating the record
        }
    }


    Hope it helps.

    Best Regards

    Leo

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Can you change the 'you must provide a value for...' to show the display name of the field?

    Hi,

    Are you referring to the default message showing schema name instead of display name? Is this field on BPF? If yes, this is a known issue with the current version which will be fixed in upcoming version. once fixed, it will show the display name instead of schema name.

    This happens if you have a field in BPF but not in form i.e. say you have a required field customer added to the BPF stage but you haven't added this field on the form then you get this schema name in the error message. The workaround is to put field on the form as well.

    Below is the response from Microsoft-

    ======

    PROBLEM/ASK :

    RE: [REG:118110819318980] ] Incorrect message for mandatory field  

    Cause: This is a BPF specific issue where the code doesn't get label properly. Label is null based on current logic, so schema name is displayed.

    Resolution :

    Not resolved – would be addressed in Future releases.

    ==============

    Hope this helps.

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Can you change the 'you must provide a value for...' to show the display name of the field?

    Hi ,

    This is OOB message you can not change this  message format.

    Alternatively you can use custom JavaScript control notification in that case.

    Have a look below article -

    neilparkhurst.com/.../javascript-notifications

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans