Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Show bootstrap modal on button click

Posted on by Microsoft Employee

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

  • Suggested answer
    Jharana Baliyar Singh Profile Picture
    Jharana Baliyar Singh 2,665 on at
  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,048 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
    Community Member Microsoft Employee 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
    Kokulan 18,048 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans