Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Business Rule - Unlocking fields removes field values

Posted on by 1,320

I created a business rule that locks fields when Submit Answers = Yes, and unlocks fields when Submit Answers = No. For some reason, the values from the Answer fields get removed after checking the Submit Answers box and hitting Save. Why? Any help would be appreciated, thanks.

12032.Capture2.PNG

After entering answers, checking Submit Answers, then saving form. Values get removed.

03644.Capture.PNG

*This post is locked for comments

  • epark06 Profile Picture
    epark06 1,320 on at
    RE: Business Rule - Unlocking fields removes field values

    Thanks, I've updated my post to show a screenshot of the business rule. I added setSubmitMode to all the answer fields, and now it is keeping the values. Thank you!

  • Verified answer
    Mazen Profile Picture
    Mazen 55 on at
    RE: Business Rule - Unlocking fields removes field values

    are you using javascript on the same fields?

    if yes it is recommended to use the JS on all the customization on the form and in this case you need to use setSubmitMode function after making the field locked.

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Business Rule - Unlocking fields removes field values

    Ideally this should not expected behaviour for business rules . Could you please share screenshot of business rules.

    In addition  create a JS function an register in onload event where set all the answer fields setsubmit mode always.

    function setSubmitModeFields()

    {

    Xrm.Page.getAttribute("AnswerFieldName1").setSubmitMode("always");

    Xrm.Page.getAttribute("AnswerFieldName2").setSubmitMode("always");

    }

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans