Search This Blog

Sunday, November 22, 2015

How to open the form using javascript with parameters

Open new entity form using javascript

If you have any doubt in the post please post comments. I will try to solve your problem.

Syntax:
Xrm.Utility.openEntityForm( entityName, id, parameters);

entityName:Name of the entity name
id:Id of the existing record open
parameters: value to be fill when form open

Example:To open a new form in CRM through javascript

var parameters={};
//Set text in the Description field.
 parameters["description"] = "Default values for this record were set programmatically.";
 //Set optionsSet value
 parameters["accountlookup"] = "2878282E-94D6-E111-9B1D-00155D9D700B";
 //Set optionsSet value
 parameters["address1_addresstypecode"] = "3";


Xrm.Utility.openEntityForm( "quote" , null , parameters);

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.