It seems that I am not able to set the Main Form for an entity in my Model Driven App,
So I have two entities
Entity1 and Entity2
Entity1 contains a lookup for Entity2 and there is a 1 to N relationship between the two.
For Entity2 I have two main forms:
When in the Entity1 form I have a button that should be able to call the second Entity2 form using
This seems to be working, however when I access the Entity2 from the SItemap and try to access the main form, I always get the second form.
I tried to ensure the forms are in the correct order from Entity -> Forms -> Forms Order and indeed, the first one is the Information form. I even tried removing the Form from the list of forms in the App Designer and I am still getting the History form as default when working on the app.
tried opening new browsers to exclude session issues.
what is going on?
Hi MarkDeg,
I'm glad your problem has been solved, the original default form may have flow or plug-in, which result in it.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
Thanks for your reply. As i mentioned, my issue was not caching or session related as I had already tried opening a new browser.
However manged to get it to work, simply by creating a new main default form, and now it is working as expected!
i guess the default main form was somehow not working properly. no idea why, but glad i found it.
thanks again
Mark
Hi MarkDeg,
I have try to set form order and add following Js code to the form, and it open history form (not default form) successfully.
Then I access entity from site map, it open Information form(default).
function testopenform() { var entityFormOptions = {}; entityFormOptions["entityName"] = "new_aidefault"; entityFormOptions["formId"] = "c7e00672-70c1-4a2d-a940-02d387ee0f56"; entityFormOptions["entityId"] = "0b06bbd5-06dd-ea11-a813-000d3a56957f"; // Open the form. Xrm.Navigation.openForm(entityFormOptions).then( function (success) { console.log(success); }, function (error) { console.log(error); }); }
As you mentioned, you can access history from when you have deleted it, it seems a caching issue, Clear the cache of the browser or use private mode in browser.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
Daivat Vartak (v-9d...
225
Super User 2025 Season 1
Eugen Podkorytov
106
Muhammad Shahzad Sh...
106
Most Valuable Professional