Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Business required field

Posted on by 12,070 Super User 2024 Season 1

Hi all,

I have two fields on opportunity form Method and Require. Require field is two options type as shown below

1682.Untitled1.png

When Require field is set to Yes. The Method field behave like business required field on form. Is there any way to do so.?

I tried to make workflow but not find How to make a work flow which fulfill my requirement.

Thank you

*This post is locked for comments

  • PS Profile Picture
    PS 23,577 on at
    RE: Business required field

    Can you clear cache and try it again. I cant see anything wrong in script.

  • Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Business required field

    Hi Prashant Shukla

    On new records.

    Thank you

  • PS Profile Picture
    PS 23,577 on at
    RE: Business required field

    Are you trying it on new record or existing record?

  • Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Business required field

    Hi all

    When I debug it. It working for all the cases but when I do without debugging. It starts giving me problem as mentioned above.

    Thank you

  • Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Business required field

    Hi all

    I write code on require field's On Change event. It do nothing when first set this field Yes and then go for other fields. If set it Yes on second time It is giving me effect. Where I am wrong. Please tell me?

    Thank you

  • Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Business required field

    Hi Prashant Shukla, Wayne Walton and Biao Xiao

    It has been done.

    Thank you

  • Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Business required field

    Hi Prashant Shukla, Wayne Walton and Biao Xiao

    I wrote code require onChange event but starts to do nothing.

    Thank you

  • Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Business required field

    Hi Prashant Shukla, Wayne Walton and Biao Xiao

    I am unable to see onChange event as shown below

    6864.Untitled1.png

    Thank you

  • Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Business required field

    Hi Prashant Shukla, Wayne Walton and Biao Xiao

    After saving first time it make this field required. I also add Xrm.Page.data.entity.addOnChange but it still behaving same

    Thank you

  • Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Business required field

    Hi Prashant Shukla, Wayne Walton and Biao Xiao

    I also wrote this but it still saving for the first time

    function requiredmethod_onchange() {
    Xrm.Page.data.entity.addOnSave;
    var require = Xrm.Page.getAttribute('aw_require').getValue();
    if (aw_require == 1) {
    Xrm.Page.getAttribute("aw_method").setRequiredLevel("required");
    }
    }

    Thank you

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