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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)
Active Discussion

Is it possible to pass URL in openquickcreate method?

(0) ShareShare
ReportReport
Posted on by

hello there,

function OpenNewContact() {
debugger;
// Get Contact Details
var a_name=Xrm.Page.getAttribute("name").getValue();
var l_id=Xrm.Page.getAttribute("primarycontactid").getValue()[0].id;
var l_name=Xrm.Page.getAttribute("primarycontactid").getValue()[0].name;
var extraqs = "acc_name="+a_name+"";
extraqs += "&lookup_id="+l_id+"";
extraqs += "&lookup_name="+l_name+"";
var features = "location=no,menubar=no,status=no,toolbar=no";
//set details to new entity form
window.open("/main.aspx?etn=account&pagetype=entityrecord&extraqs=" +
encodeURIComponent(extraqs), "_blank",features,false);
}
function openContactForm() {
debugger;
// Retreive details through getQueryStringParameters
var queryprm=Xrm.Utility.getGlobalContext().getQueryStringParameters();
var parameters={};
parameters["id"]=Xrm.Page.data.entity.getId();
parameters["name"]=queryprm.acc_name;
parameters["primarycontactid"]=queryprm.lookup_id;
parameters["primarycontactidname"]=queryprm.lookup_name;
//Assign values to QuickCreate
Xrm.Utility.openQuickCreate("account",null, parameters);
}

*This post is locked for comments

  • Kokulan Profile Picture
    18,054 on at

    Hi

    Please see below for what you could pass for this function

    ScreenClip-_5B00_321_5D00_.png

    [View:https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2015/developers-guide/jj602956(v=crm.7)#openquickcreate:750:50]

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    I believe it's possible. Do you experience any issues?

  • Rajesh Chungath Profile Picture
    467 on at

    The method openQuickCreate will not accept URL. You can follow the below syntax

    Xrm.Utility.openQuickCreate(entityLogicalName,createFromEntity,parameters).then(successCallback, errorCallback).

  • Community Member Profile Picture
    on at

    yes when i use custom string parameter i can't push that string values inside that method, that's why i need the url

  • Kokulan Profile Picture
    18,054 on at

    Could you share your code please?

  • Community Member Profile Picture
    on at

    function OpenNewContact() {  

    debugger;

    // Get Contact Details

    var a_name=Xrm.Page.getAttribute("name").getValue();

    var l_id=Xrm.Page.getAttribute("primarycontactid").getValue()[0].id;

    var l_name=Xrm.Page.getAttribute("primarycontactid").getValue()[0].name;

       var extraqs = "acc_name="+a_name+"";  

       extraqs += "&lookup_id="+l_id+"";  

       extraqs += "&lookup_name="+l_name+"";  

    var features = "location=no,menubar=no,status=no,toolbar=no";  

    //set details to new entity form

       window.open("/main.aspx?etn=account&pagetype=entityrecord&extraqs=" +  

        encodeURIComponent(extraqs), "_blank",features,false);  

    }  

    function openContactForm() {

          debugger;

          // Retreive details through getQueryStringParameters

           var queryprm=Xrm.Utility.getGlobalContext().getQueryStringParameters();

           var parameters={};

           parameters["id"]=Xrm.Page.data.entity.getId();

           parameters["name"]=queryprm.acc_name;

           parameters["primarycontactid"]=queryprm.lookup_id;

           parameters["primarycontactidname"]=queryprm.lookup_name;

           //Assign values to QuickCreate

    Xrm.Utility.openQuickCreate("account",null, parameters);

    }

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans