web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Retrieve System views based on model driven app

(0) ShareShare
ReportReport
Posted on by 700

Hi,

We have created two Model-driven apps and one for a salesperson and the other for a service person. In the app, we have added specific views so that each app has access to proper views. It's working correctly from CRM. We have also developed one HTML application in which we read the view list. But in our HTML its shows all the views so that when salesperson opens the HTML then they see all views but it should only show those that are available in their model-driven app. Is there any API or script using which we can read system views from CRM that are defined in the model-driven app.

Thanks!

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

    Hi,

    You can use appmodules => appmodulecomponents to find the views of your application.

    With WebAPI :

    1. Find appmoduleidunique: appmodules?$select=appmoduleidunique&$filter=uniquename eq 'AppName'

    2. Find system views: appmodulecomponents?$filter=componenttype eq 26 and _appmoduleidunique_value eq 'appmoduleidunique'

    System view = 26

  • Suggested answer
    Balasaheb Profile Picture
    700 on at

    Hi Xavier,

    Thanks for your reply. We have checked the above Web API queries but they did not work. When we got the “appmoduleidunique” from “appmodules” and then pass in _appmoduleidunique_value field in appmodulecomponents but it did not return anything.

    For troubleshooting when we fetch all appmodules and then all appmodulecomponents and when we tried to find _appmoduleidunique_value from  “appmodulecomponents” in “appmodules” then it did not find it.

    pastedimage1680161402238v1.png

    pastedimage1680161426564v2.png

    We wanted to confirm from where we get the value for _appmoduleidunique_value.

    Thanks!

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

    You can use the WebAPI function: /api/data/v9.2/RetrieveAppComponents(AppModuleId=<AppModuleId>)

    This function use the appmoduleid instead of appmoduleuniqueid

    If the app includes all views, the result will not contain componenttype = 26

  • Balasaheb Profile Picture
    700 on at

    Hi Xavier,

    Thanks for your reply. It is really helpful.

    Thanks!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 180 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 123

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans