function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sudeep SinghSudeep Singh 

Instantly write a field while creating record

In lead I have four fields :- 
First Name
Last Name
Shipping First Name
Shipping Last name

While creating record we need to give input for all the fields. I need to do one automation that, when a user click on checkbox "Same as First and Last name" then Shipping First Name and Shipping last name must be automatically write the values of First name and Last name.

Summary :- 

First Name =  Test
Last Name = Check
Clicked on Same as First name and last name checkbox
Shipping first name  = test
Shipping Last name = check

Thanks
Best Answer chosen by Sudeep Singh
Sai PraveenSai Praveen (Salesforce Developers) 
Hi sudeep,

In that scenario, you have to customize the entire page. You have to replace the new button or edit button with your custom lightning page.

Thanks,


 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Sudeep,

You can achieve this using record-triggered flow. Are you okay to have this logic using flows or do you need trigger logic for this.

Thanks,
 
Sudeep SinghSudeep Singh
Using flows I need

Thanks
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Sudeep,

You can create a record-triggered flow as below.


Start Element:

User-added imageyou have to just add the update triggered record element as below.

User-added imageLet me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
Sudeep SinghSudeep Singh
I see both the image are same

Thanks
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Sudeep,

I have updated the answer.

Thanks,
 
Sudeep SinghSudeep Singh
OR(AND(ISNEW(),{!$Record.Same_as_First_Last_Name__c}), AND(ISCHANGED({!$Record.Same_as_First_Last_Name__c}),Same_as_First_Last_Name__c))

Is this formula is correct?

Thanks
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Sudeep,

Yes, that is correct.

Thanks,
 
Sudeep SinghSudeep Singh
User-added image

See its not reflecting in Shipping first name and last name

Thanks
Sai PraveenSai Praveen (Salesforce Developers) 
hI Sudeep,

You have to save the record it wont save unless you save it.

Thanks,
 
Sudeep SinghSudeep Singh
But i need this to be reflected before saving.
That is what my requirement

Thanks,
Sai PraveenSai Praveen (Salesforce Developers) 
Hi sudeep,

In that scenario, you have to customize the entire page. You have to replace the new button or edit button with your custom lightning page.

Thanks,


 
This was selected as the best answer
Yates YatesYates Yates
To instantly write a field while creating a record, you would need to use a form or interface that allows for field input during record creation. This could be achieved through various methods such as creating a custom form in a database program, using a web-based form builder, or utilizing a pre-existing form in a business software application. Simply ensure that the field is included in the form and is set up to allow for input during record creation.

https://www.myjdfaccount.us/