Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

OnLoad script after businsess rule?

Posted on by 20

Hi,

I have the script that make field 'name' required on form load. This field is set to optional in CRM. There is also business rule, which changes 'name' to optional in some cases. (it wasn't me who set this like this)

Sometimes I have the problem that in the case in which business rule should make the field optional it's still required, is it possible that sometimes js script i loaded after business rule or maybe business isn't called at all?

Thank you for any help,

Henryk

  • Verified answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    RE: OnLoad script after businsess rule?

    Hi,

    In CRM Javascript VS Business Rule-> The script trigger first then business rule.

    Now, in above case, we can do below things:

    1. Delete/Deactivate the business rule.

    2. Update the logic business rule logic. Like it should be trigger when user in Edit mode.

    3. If script logic can be handled through business rule then move to business rule and remove the script.

    4. If you want the "name" to be mandatory all the time then in Field Customization set it to business required.

    Thanks,

    Pradeep.

    Please mark this as VERIFIED if it helps.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,552 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,552 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans