We are currently using an s-control override on the New button to provide a default value for the Name field on various custom objects. For lightning experience, we have to replace this functionality with a different kind of override. I know that I can provide initial values via lightning actions, but this means having to create a button for each record type, and also won't replace the new button on list view pages, etc.

How are other people handling this? We have a temporary workaround of a visualforce page that then calls sforce.one.createRecord() (Summer '17 can pass in default values), but as I asked here, this creates some problems of its own.

1 Answer 1


What about



It has been significantly improved with Summer'17 and now you can even add default values. Plain and simple, you can use it like this one-liner:

    Name : "2017-10-01 - Power Corp. - Big Deak - 999k",

From the Summer '17 Release Notes - Prepopulate Fields on a Record Create Panel

Speed up record creation with prepopulated field values. The sforce.one.createRecord function now includes defaultFieldValues (optional) so you can define fields on a record create panel, including fields not displayed on the panel. This change applies to Lightning Experience and the Salesforce1 mobile browser app.

Users must have create access to prepopulated fields. Errors during saving that are caused by field access limitations do not display error messages.

Caution 1:

The this feature from Summer'17 works only if you put your Visualforce Page to API v40.0 or higher.

Caution 2:

Objectnames and Fieldnames are CASE-SENSITiVE! So name is not Name and only Name is correct

See also:



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .