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 :
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)
  • Kokulan Profile Picture
    18,054 on at

    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

  • Community Member Profile Picture
    on at

    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.  

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    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();

    })

  • Suggested answer
    Jharana Baliyar Singh Profile Picture
    2,667 on at

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans