Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Populate form, onclick event of ribbon button through Javascript

Posted on by 335

Hi there,

I'm trying to do something quite simple  with Javascript, I need some help.

On the lead form, I have one ribbon button: Disqualify(which has multiple options like cancel,lost etc)

when user clcik on Disqualify and select any one. 

then  javascript function will be called and it's  Check one of field(is existing contact) which has two options(yes/no)

if selected is no then conatct form will be open.

Thank you.

Regards.

*This post is locked for comments

  • Suggested answer
    Prudvihub Profile Picture
    Prudvihub 65 on at
    RE: Populate form, onclick event of ribbon button through Javascript

    take a look into below post some what is helpful

    https://prudvihub.blogspot.com/2020/08/onclickof-ribbon-button-how-to-create.html

  • Suggested answer
    Sreevalli Profile Picture
    Sreevalli 3,256 on at
    RE: Populate form, onclick event of ribbon button through Javascript

    Hi Yash,

    If you are talking about oob button "Disqualify" then you should customise the the button to add the Javascript functionality as per your logic. checkout sample - www.inogic.com/.../modify-oob-ribbon-button-for-specific-activity-type-entity

    Call your javascript function in command actions

  • Verified answer
    RE: Populate form, onclick event of ribbon button through Javascript

    hello,

    use below function .

    function Form_onsave() {  

    Xrm.Utility.confirmDialog("Click Yes or cancel",

          function() {      

                var name = Xrm.Page.getAttribute('name').getValue();

                //Xrm.Utility.openEntityForm("msdyn_project");

                  var parameters = {};

                 parameters["msdyn_description"] = name;

                 Xrm.Utility.openEntityForm("msdyn_project", null, parameters);

          });

    }

    Hope this helps.

    Thanks,

    Pradeep

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans