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

How to include a screen flow in a Lightning Web Component

 Hi, Assume  you have a flow called "Quick Contact Creation" and API Name for the same is "Quick_Contact_Creation". To i...