Activity Forums Salesforce® Discussions Dependent picklist not getting populated while creating a record using force:create Record in Salesforce Lightning?

  • Prachi

    Member
    August 13, 2019 at 5:25 pm

    Hi Deepak,

    Try this -

    Controller-

    ({
    doInit : function(component, event, helper) {
    var createEvent = $A.get("e.force:createRecord");
    createEvent.setParams({
    "entityApiName": "Test_Object__c",
    "defaultFieldValues": {
    Name : 'Test Record1',
    Description__c :'test description',
    Parent_field__c : 'a',
    Child_Field__c : '1',
    additional_field__c : 'q'
    }
    });
    createEvent.fire();
    }
    })

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos