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 365 | Integration, Dataverse...
Answered

Custom Button on form unreliable on phone browser

(0) ShareShare
ReportReport
Posted on by 10

Hi. I have added a custom button on a form, when this button is clicked on a quick create form opens up. This works fine on the Desktop version of Dynamics however when users use this button on their phone the button sometimes works and sometimes don't. I have tested it my self and it seems like upon refresh of the page the button sometimes stops working, as in the button does nothing and the quick create form don't open up. This is NOT the Dynamics app for phones, but the normal web browser on the phone. 

This was tested in Safari (latest version) using Iphone. And on Google browser on phone. 

This is the button in question: 

pastedimage1679560556191v2.png

Any suggestions on how to get the button to be more reliable?

I have the same question (0)
  • XM-22040801-0 Profile Picture
    11 on at

    Hello, can you share the associated source code ?

  • Eiken Profile Picture
    on at

    Hi,

    Would you please share your web resource about this button.

    Did you try to use it in another browser?

  • MA_Dynamics Profile Picture
    10 on at

    It seems like turning on "enable for mobile" did make the button somewhat more reliable

    pastedimage1679644183131v2.png

    however here is the source code for the HTML file:

    <!DOCTYPE html>
    <htmllang = "en"xmlns = "">http://www.w3.org/1999/xhtml">
       <head>
          <metacharset = "utf-8"/>
          <title></title>
             <script type="text/javascript" src="/WebResources/evry_showcompliance"></script>
       </head>
       
       <body>
     <button onclick="compBtn()">Ny Compliance</button>

       </body>

    </html>

  • Suggested answer
    XM-22040801-0 Profile Picture
    11 on at

    I made a reproduction and it works on Safary on Iphone.

    You can try:

    1. Make sure that the checkbox "Restrict cross frame scripting, where supported" box is not checked the web-resource control.

    2. Use a relative path to the JS file to use cache. See https://learn.microsoft.com/en-US/power-apps/maker/data-platform/powerapps-checker/rules/web/use-cached-webresource
    Replace in script tag: /WebResources/evry_showcompliance by evry_showcompliance

    3. Try browsing with Safari in private mode to make sure it's not a cache issue. Try disabling the pop-up blocker.

    4. Make a minimal test in your JS file
    You can try this code which opens a quick create form for a contact:

    function compBtn() {
        parent.Xrm.Navigation.openForm(
        		{
        			entityName: "contact",
        			useQuickCreateForm: true
        		}
        	);
    }

    5. Embedded the script in the HTML web-resource.

     

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 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 49 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

#3
#ManoVerse Profile Picture

#ManoVerse 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans