web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Pass Input Parameter To Dialog Box Using Java Script.

(0) ShareShare
ReportReport
Posted on by

Hi All,

I am using  Xrm.Internal.openDialog() to open html webresource from the client side.

My requirement is I want to pass the value as a parameter to this dialog when it is call from crm form.

If its possible to send the value to the dialog.

Then how can we receive that sent value in the  dialog.

Thanks in Advance.


          

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    After a long research I got the answer to my question

    Create a url with a query string, Only specified parameter can be send.

    For specified parameter follow this link :-

    msdn.microsoft.com/.../gg309536.aspx

    var url = "/WebResources/<webresourceName>?id=12&data=base64photo";

          Xrm.Internal.openDialog(url, DialogProperty, null, null, callBackResponse);

    To get the paramter value In Dialogbox :-

    var paramtervalue =Mscrm.Utilities.getContentUrl().$1D_0

  • Suggested answer
    Community Member Profile Picture
    on at

    I have a same problem and I found solution on this page.

    Pass multiple values to a web resource through the data parameter

  • Seenivasan M Profile Picture
    307 on at

    Dear Pankaj Kumar,

    Can you please past your code here.

    I am not able to read the parameter values in my Html file.

    var guid = Xrm.Page.data.entity.getId();
    var clientUrl = window.parent.Xrm.Page.context.getClientUrl();
    var customParameters = encodeURIComponent("recordId=" + guid + "&url=" + clientUrl + "");

    var url ="/WebResources/new_TestModel";
    Xrm.Internal.openDialog(url, DialogOption, customParameters, null,function (returnValue) { alert(returnValue) });

    I am using getDataParam() method to receive input parameters in my html code but it says no parameter passed.

    can you help me on this.

    Thanks,

    Seenivas

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans