Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Pass parameters to form in JScript

$
0
0

Am trying to set default values for fields on the form but get an error. Any clues on what I'm doing wrong?

The script is on click of a ribbon button on Account form

 function addDetails()
    {

        var windowoptions = {
            openInNewWindow: true
        };
        var parameters = {};
        
        // Set Customer lookup on the Child entity form with data from the Account form. 
    
        parameters["new_customerid"] = Xrm.Page.data.entity.getId();
        parameters["new_customeridname"] = Xrm.Page.getAttribute("name").getValue();
         parameters["new_customeridtype"] = "account";
        
            Xrm.Utility.openEntityForm("new_details", null, parameters, windowoptions);
         
        
    }


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images