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 :
Customer experience | Sales, Customer Insights,...
Unanswered

Javascript button that triggers a value input to be used as a variable later

(0) ShareShare
ReportReport
Posted on by 2,175

Hi all,

I'm not sure if it's possible and I noticed that dialog is deprecated. I want to add a custom button in opportunity, that when clicked pops out a dialogue or a box that allows the user to enter a note and then assigning the opportunity to a specific queue.

I'm fine with the Javascript aspect but just wondering if there's a method for Dynamics to pop out a box that can receive custom parameters entered by the user who's clicked the button and then use these parameters in the javascript.

I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at

    Hi Mike,

    You could design a HTML web page which includes some input fields and buttons, the fields will allow users to type note or parameters, then bind javascript function to buttons.

    e.g:

    1. When user clicks custom button, pop out the web resouce dialogby Xrm.Navigation.navigateTo function.

    2. User will type parameters or note text in input fields of web resouce.

    3. When user clikcs one of button, run function of creation of note or AddToQueue action.

    Regards,

    Clofly

  • MikeC282 Profile Picture
    2,175 on at

    Thanks bud! One thing I noticed with the new modal dialogue method is that there's no API to close the dialogue if you click a custom button in the web resource.

    stackoverflow.com/.../d365-modal-dialog-close-via-javascript

    github.com/.../791

    I suppose we can do it with a series of DOM manipulation but I'm assuming it's an unsupported method.

  • cloflyMao Profile Picture
    25,210 on at

    Hi Mike,

    I agree with you that we might need to close modal dialog by unsupported method such as DOM manipulation.

    Please let me know whether you still have any other problem.

    Regards,

    Clofly

    Please kindly mark as verified if you had found any answer helped, it would be really appreciated.

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans