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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Alert function

(0) ShareShare
ReportReport
Posted on by
function showConfirmDialog() {
    Xrm.Utility.confirmDialog("Click Yes or No to set the Personal Notes Value",
        function() {
            Xrm.Page.getAttribute("description").setValue("Yes Callback fired");
        },
        function() {
            Xrm.Page.getAttribute("description").setValue("No Callback fired");
        });
}

this is my code, i want users to fill the description manually after clicking on "ok" or "cancel"
i dont want the setValues() to be in description.
I have the same question (0)
  • Suggested answer
    Francisco Murtinheira Profile Picture
    on at

    Hello, It looks like your code is working correctly. So if you want to use a different field than description, you just have to change your code to use a different field.

    For example I took your code and made it run for the fax field on the Accounts form.

    We need the logical name of the field.

    pastedimage1580375103292v1.png

    And then we just change the code slightly.

    function showConfirmDialog() {
    Xrm.Utility.confirmDialog("Click Yes or No to set the Personal Notes Value",
    function() {
    Xrm.Page.getAttribute("fax").setValue("Yes Callback fired");
    },
    function() {
    Xrm.Page.getAttribute("fax").setValue("No Callback fired");
    });
    }

    pastedimage1580375177549v2.png

    Hope this 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

Responsible AI policies

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

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 57 Super User 2026 Season 1

#2
Eugen Podkorytov Profile Picture

Eugen Podkorytov 26

#3
CU07021359-0 Profile Picture

CU07021359-0 23 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans