Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Loading a form depending on device

Posted on by 160

I have a CRM form that that looks good when viewed from a monitor.  However, it doesn't look very good on a phone or tablet.  I would like to have another form load that is more mobile UI friendly if the user is viewing the app from a mobile device.  Both forms are from the same entity.

Does anyone have any advice on how to detect the type of device and load the appropriate form automatically?

Thanks.

*This post is locked for comments

  • Suggested answer
    Z_Mike Profile Picture
    Z_Mike 160 on at
    RE: Loading a form depending on device

    Thanks for the tip.  I think the getClient() method is what I need.

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Loading a form depending on device

    Normally you can use the Xrm.Page.ui.formSelector and the navigate() method to open a given form, but the Xrm.Page.ui.formSelector is not available in the mobile client. You could maybe default to using the mobile-friendly form, and use the navigate() method to open the other form if a non-mobile client is used - you can use context.client.getClient() to determine if the client is Web or Mobile

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans