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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Show bootstrap modal on button click

(0) ShareShare
ReportReport
Posted on by

Hi,

I need to show bootstrap modal on click of a button in d365 but its opening in new window pop up. I need to show it on the same screen.

Any help would be appreciated.

Thanks in advance. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Jharana Baliyar Singh Profile Picture
    2,667 on at
    RE: Show bootstrap modal on button click

    Hi Amit,

    https://www.c-sharpcorner.com/article/how-to-open-popup-using-client-side-javascript-in-crm/

    The above url you can check once I have not tested in current version.

    You can check with the below ones too :

    https://getbootstrap.com/docs/4.0/components/modal/

    http://www.toplinestrategies.com/blogs/net/display-js-modal-dynamics-crm

    http://blog.clickdimensions.com/display-clickdimensions-form-modal-dialog/

    Thanks,

    Jharana

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Show bootstrap modal on button click

    You might want to check on dev tool console to see if anything logged at all.

    One other option i used is the following bit of code on ribbon button click, its not a supported approach but it works for me.

    var src = "/webresources/pa_bootstrapmodal?Data=" + encodeURIComponent("entity=" + targetEntity + "&recordId=" + Xrm.Page.data.entity.getId());

    var DialogOptions = new Xrm.DialogOptions();

    DialogOptions.width = 950;

    DialogOptions.height = 650;

    Xrm.Internal.openDialog(src, DialogOptions, null, null, function callbackFunction(result)

    {

       if (result)

           Xrm.Page.data.refresh();

    })

  • Community Member Profile Picture
    on at
    RE: Show bootstrap modal on button click

    Thanks for the prompt reply.

    I also thought of this but somehow alertjs V2 is not working.

    ```  Alert.showWebResource("webresourceName")```

    I am using this method but its not working neither throwing any exception.

    I am using using latest version of d365.  

  • Kokulan Profile Picture
    18,054 on at
    RE: Show bootstrap modal on button click

    Hi

    I have done the same using the following solution, which allows your to open webresource within the same window

    github.com/.../alertjs

    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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans