Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Multiple Apps with Single Shared entity Dynamics 365 Unified interface

(0) ShareShare
ReportReport
Posted on by 135

Hi,

We have Multiple Dynamics 365 Apps (Line of Business) which are using the same shared entities (ex : account and contact).  how can we manage common plugins and JavaScript code functionality across these multiple apps

your suggestions would be greatly appreciated.

Thanks

-Srikanth

  • Srikanth Reddy Profile Picture
    Srikanth Reddy 135 on at
    RE: Multiple Apps with Single Shared entity Dynamics 365 Unified interface

    Thanks Wahaj, Very interesting. I am working on multi stream model (different line of business) / Apps, How can we manage D365 Solution packaging and deployment specially in case of multiple apps.

    your suggestions would be greatly appreciated.

    Thanks

    -Sri

  • Suggested answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: Multiple Apps with Single Shared entity Dynamics 365 Unified interface

    Hi,

    You are welcome.

    You cannot get App ID in a Plugin or Workflow, as these are not App aware.

    App ID/Name/URL is only available at client-side.

    I would suggest to identify your data based on one of these:

    • Business Unit: calling user's Business Unit could identify a specific business scenario (depends on your implementation).
    • Field/Flag: use an optionset to understand type of data. For example, lets assume we have two different Apps for Wholesale and Retail businesses. While creating an Account from wholesale app, set Account Type to Wholesale and and similarly set Retail on other App (using Business Rule/Workflow). Then use this optionset value to segregate implementation in plugins.

    Again, the concept of Apps is related to Client Side, not the back-end.

    If you still need the App ID in plugins, we have following workaround:

    • Create a field named "Origin App ID" (for example) and set current APP ID using Javascript (on form load while creating the record), you can then use this field in a plugin or workflow.

    You can get the APP ID using JS:

    How to Get the AppId of a Dynamics 365 Power App using JavaScript - Carl de Souza

    Here is a similar thread:

    (+) How to get current Application ID in CRM Plugin - Microsoft Dynamics CRM Forum Community Forum

    Please note, same record can be accessed by multiple Apps, which makes it more complex. That is the reason, we should rely on Business Unit or Data.

    If my answers are helpful, please mark these as verified (select 'Yes' under 'Did this answer your question?').

  • Srikanth Reddy Profile Picture
    Srikanth Reddy 135 on at
    RE: Multiple Apps with Single Shared entity Dynamics 365 Unified interface

    Thanks Wahaj for the detail explanation, can you please suggest how can we identify the app from which the plugin get triggered, can we use appid/app name to isolate between these apps as we are using the same plugin for different apps.

    Thanks

    -Sri

  • Suggested answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,321 on at
    RE: Multiple Apps with Single Shared entity Dynamics 365 Unified interface

    Hi,

    Thank you for your query.

    Please note, Apps are just container (UI) to bind following components:

    • Sitemap (Navigation)
    • Entities
    • Dashboards
    • Business Process Flows
    • Forms
    • Views
    • Charts
    • Dashboards

    This means, you can choose which of above components are available in an App. And you can control the access by Roles to the Apps.

    Now, the plugins/JS, or other processes (except Business Process Flows) are available across the Apps.

    This means, when you create or import a Solution, it is created or imported for All Apps.

    Any plugins, registered on an entity, will be executed for All Apps. You can say, Workflows and Plugins are not App aware, they run as part of the platform.

    Similarly, JavaScript web-resources are available to All Apps (as part of a solution), however you can use them in different forms, and forms can be included/excluded from an App.

    To make it clear, lets say you have 2 forms on Contact, one for App1 and other for App2. You create one JavaScript Webresource (library) to handle on-load events on both forms. Now when you only include only 1 form in App1, still the JS web-resource will be available to the both apps.

    To summarize, any Plugins/Workflows/Web Resources/Flows will be available and executed for all Apps, you do not need to manage these separately.

    You can create Solutions to manage these components at one place.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans