Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How to differentiate between modular form(using navigateTo Client API) and normal form

Posted on by 475
Hello,
How to differentiate between modular form(using navigateTo Client API) and normal form. Like i need to show an alert box on save of modular form, while i don’t need to do the same in normal form for same entity.
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to differentiate between modular form(using navigateTo Client API) and normal form
    [quote user="Wahaj Rashid"]

    Hi,

    If you mean legacy app by normal form, you can use getCurrentAppName method to identify current app.

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-utility/getglobalcontext/getcurrentappname

    You can also use Xrm.Internal.isUci()  (it is unsupported however), see below thread for details:

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/281873/js-check-run-on-uci-or-not

    Best,

    Wahaj

    (if it answers your query, mark it as verified)

    [/quote]

    We are using Xrm.Navigation.navigateTo to open modular form of Entity 2 from Entity1 form. We need to show alert onsave which is happening. But we should restrict this from happening when the user is in Entity 2 form and trying to save. UCI isn't being used for both scenarios.

  • Suggested answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,319 on at
    RE: How to differentiate between modular form(using navigateTo Client API) and normal form

    Hi,

    If you mean legacy app by normal form, you can use getCurrentAppName method to identify current app.

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-utility/getglobalcontext/getcurrentappname

    You can also use Xrm.Internal.isUci()  (it is unsupported however), see below thread for details:

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/281873/js-check-run-on-uci-or-not

    Best,

    Wahaj

    (if it answers your query, mark it as verified)

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

Product updates

Dynamics 365 release plans