When a percentage sign exists in a field that needs to be sent to another form through the "extraqs" URL parameter, it "breaks" the ribbon by hiding it under a blue bar. See screenshots for visual aid.
This is the method I use to send the extraqs to the newly opened window to the form:
window.open("/main.aspx?etn=new_privatemessages&pagetype=entityrecord&extraqs=" + encodeURIComponent(extraqs), "_blank", features, false);
The field that is causing this is a lookup field that is meant to be auto-populated through the built in CRMD functionality, using the id and name parameters.
I'm not sure how to fix it. Any ideas?
*This post is locked for comments
Based on MSDN new window option is available in 2015 - msdn.microsoft.com/.../jj602956(v=crm.7).aspx
2015 On-premise.
What's the version of CRM are you on?
Actually, the onload function issue seems unrelated. I put back the old code and it's still there.
Here's the function that I created using your initial feedback:
function OpenNewMessage(extra) { var windowOptions = { openInNewWindow: true }; var parameters = {}; parameters["new_caseid"] = parent.Xrm.Page.data.entity.getId(); parameters["new_caseidname"] = parent.Xrm.Page.getAttribute("title").getValue(); if(typeof extra !== 'undefined'){ for(param in extra){ parameters[param] = extra[param]; } console.log(parameters); }
parent.Xrm.Utility.openEntityForm("new_privatemessages", null, parameters, windowOptions); }
That's a bit weird - I have never experienced those issues.
Can you please provide code you used previously - that uses window.open? Also can you please post an example that causes issue you mentioned in initial post?
The Xrm.Utility.openEntityForm method does solve the percentage sign problem, but introduces new ones.
The windowOptions parameter doesn't seem to work. Could be a CRM version issue.
Internet Explorer (Chrome works fine) now brings up an error saying that one of my onload functions on the opened form is undefined.
Not sure I like that trade-off.
Hello,
Have you tried to use Xrm.Utility.openEntityForm? Check this - msdn.microsoft.com/.../jj602956.aspx
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,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156