Announcements
If I open a main form as a dialog using the navigateTo function, how can I tell in the on-load event I have registered that this is the case? Is there a way from the context to tell that the form is being displayed as a dialog rather than normally?
Thanks
Alan
Currently I have resorted to adding a custom parameter to the form called parameter_isDialog which I set to true when opening using navigateTo. I would rather use a native way of determining this if one exists?
Hello @DCSAlan
You can only do by passing parameter in Navigateto Options
var pageInput ={ pageType ="entityrecord", entityName:"ENTITYNAME", data:{ isDialog:true } }
Once you done this in the ONLOAD of the Entity, you can use
function onload(ExecutionContext){ var formContext = ExecutionContext.getFormContext(); var xrmObjectParameter = formContext.getQueryStringParameters(); if(xrmObjectParameter["isDialog"]!=null && xrmObjectParameter["isDialog"]=true){ //Process your operation } }
Please mark as Answer if it is helpful and provide Kudos
Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLAFollow me on Twitter : @rampprakashdBlog : https://microsoftcrmtechie.blogspot.com
Thanks for confirming @rampprakash. This is the method I mentioned above so it is good to know it is my only option.
Yes @DCSAlan
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 335 Most Valuable Professional
11manish 165
MS.Ragavendar 96 Super User 2026 Season 1