I have javascript that we run on a button click that does a series of things (including running an action, etc...). Once it's done, if it's successful, I would like to close the record and go to the view page of the entity. I've found that I can use "Xrm.Page.ui.close()", but that just goes back to whatever page they were on before they opened the record. So if they were on the view page, that's fine, but if they were on a different record, it goes back to that other record.
I know there's the Xrm.Utility.OpenEntityForm, but I can only see how to use that to either go to a specific record or create a new record, not to go to the view page. And I tried even just window.open (using a URL in the format https://<site>/<org>/main.aspx?etn=<entity_name>&pageType=EntityList&web=true), which goes to what I want but it opens it in a new tab. If I add "self" in as the second parameter, it does nothing. window.location.href does nothing.
How can I have this function end by closing the record and going to the entity view? I've got to be missing something...
*This post is locked for comments
I have the same question (0)