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

Announcements

No record found.

News and Announcements icon
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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 131 Super User 2026 Season 1

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 46 Most Valuable Professional

#3
NeerajPawar Profile Picture

NeerajPawar 41

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans