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)

Show alert with some fields and one input box

(0) ShareShare
ReportReport
Posted on by 958

Hi,

I want to show some fields in an alert with single input box.

Is it possible to do with JS, if yes then how could i do the same?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    StefanS365 Profile Picture
    3,575 Most Valuable Professional on at

    the GitHub project of Paul Nieuwelaar might be an inspiration: Alert.js

  • Shakti Singh Rajput Profile Picture
    958 on at

    Thanks for the response Stefan,

    But for Alert.Js we need to purchase licence for production use.

    So, Is there any other approach to do the same?

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    The version 2.1 of Alert.js is very. You can try that-

    github.com/.../license-v2.1.md

    Hope this helps.

  • Suggested answer
    Siraj M Profile Picture
    on at

    check if the newly introduced OOB client API will be able to resolve the issue.

    check this for reference

    Regards,

    Siraj M 

  • Verified answer
    naZir Profile Picture
    850 on at

    See if the below code helps you...

    function showAlert()

    {

       debugger

       var accountName = Xrm.Page.getAttribute("name").getValue();

       var phone = Xrm.Page.getAttribute("telephone1").getValue();

       if (accountName != null)

       {

           var txtInput = prompt("Old Accounnt Name: " + accountName + "\nPhone Number: " + phone + "\nPlease Enter new Account Name to change", "");

           if (txtInput != null && txtInput != accountName) {

               Xrm.Page.getAttribute("name").setValue(txtInput);

               Xrm.Page.data.entity.save();

           }

           else {

               Xrm.Utility.alertDialog("You choose not to change Account Name");

           }

       }

    }

  • Shakti Singh Rajput Profile Picture
    958 on at

    Thanks Ahmed. It works.

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