Monday, 26 July 2021

Auto Populate Record Type,other fields and navigate to create page

 Hi,

The record type Id field is case-sensitive when we want to auto-populate with record type.

Sample Example:

var recTypeId = '012XXXXXXXX';

var createContact= $A.get("e.force:createRecord");

createContact.setParams({

"entityApiName": 'Contact',

"recordTypeId":recTypeId,

"defaultFieldValues": {                            

'LastName':'balaji',

'FirstName':'malem'

}

});

createContact.fire();

Note:

Always add recordTypeId before defaultFieldValues as above.


No comments:

Post a Comment

What’s the difference between Einstein Article Recommendations and Suggested Articles?

How Does Einstein Article Recommendations Work? Einstein Article Recommendations helps support agents resolve customer cases efficiently by ...