web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Populate form, onclick event of ribbon button through Javascript

(0) ShareShare
ReportReport
Posted on by 351

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

I have the same question (0)
  • Verified answer
    Pradeep Kumar Sen Profile Picture
    62 on at

    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

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at

    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

  • Suggested answer
    Prudvihub Profile Picture
    65 on at

    take a look into below post some what is helpful

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans