Hi ,
I got an error 'wrong url' when calling my dialog from js function.
function callDialog(dialogId, entityName, objectId) {
{
var url = Xrm.Page.context.getClientUrl() + "/cs/dialog/rundialog.aspx?DialogId=" +"7bA092EA24-6246-4F32-9341-4AB11A5077E9"+ "&EntityName=" +entityName + "&ObjectId=" +Xrm.Page.data.entity.getId();
window.open(url);
}
Any suggestions,
*This post is locked for comments
Hi Arun & Leo ,
Thank you for your replies .
I did use the call process :
Process.callDialog(DialogId,
EntityName,
EntityId,
function () {
Xrm.Page.data.refresh(false);
}, null);
and it's working fine .
Thank you both for your help.
Hi partner,
Before you call your dialog, please press F12 and open Developer Tools.
Then after you call your dialog, you can find the request record bellow Network section.
You can get your full url from Request URL.
I suggested that you can enter the full url in your browser and check if there is a problem with your url, for example, is your physical path correct?
You can also determine the source of your issue from Status Code.
Hope it helps.
Best Regards
Leo
Try this instead:
"org/cs/dialog/rundialog.aspx?DialogId=%7bA092EA24-6246-4F32-9341-4AB11A5077E9%7d&EntityName=quote&ObjectId=%7bEA21842C-8EC1-E811-8145-5065F38A3901%7d"
Hello Arun ,
Thank you for your reply ,but still had the problem.
When i debug on url (window.open(url)) i found :
"org/cs/dialog/rundialog.aspx?DialogId={A092EA24-6246-4F32-9341-4AB11A5077E9}&EntityName=quote&ObjectId={7bEA21842C-8EC1-E811-8145-5065F38A3901}"
still have the braces.
any idea why?
Curly braces {} around guid will be encoded as %7b and %7d. While copying/typing your record guid you did a typo. Guid should be 36 digits with 4 dashes and 32 chars. Try the below:
If you debug this both dialog Id & object Id should be having that proper guids.
function callDialog(dialogId, entityName, objectId) {
{
var url = Xrm.Page.context.getClientUrl() + "/cs/dialog/rundialog.aspx?DialogId=" +"{A092EA24-6246-4F32-9341-4AB11A5077E9}"+ "&EntityName=" +entityName + "&ObjectId=" +Xrm.Page.data.entity.getId();
window.open(url);
}
[View:https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/open-forms-views-dialogs-reports-url#opening-a-dialog-process-by-using-a-url]
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156