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
GasparGaspar 

Populate Picklist Value across related object (after insert and update)

Hello, I'm wondering if it's possible to do this without code. 

Objone__c has a lookup relationship with Objtwo__c 
Objone__c has an input picklist field called Picklist__c
Objtwo__c has an input picklist field called Picklist_existing__c

When creating a record on Objone__c, where "RecordType" = "X", I need Objone__c.Picklist__c to be populated from a picklist field of the related (selected) Objtwo__c record (Objtwo__c.Picklist_existing__c) after insert and after update. 

Is this possible without code? 
Best Answer chosen by Gaspar
KaranrajKaranraj
If that is the case, then you can do it using process builder itself

1. Goto Setup->Create->Workflows & Approvals -> Process builder
2. Click "NEW' and enter the name for the process
3. Select the Objone__c(Transaction) and action as 'Whene a record is created or edited'
4. In the add criteria enter RecordType = 'X'
5. In the action select 'update record' and the chose the object Objone__c(In the example I have used account object)

User-added image


6. Under the field selection select the your Objone__c.Picklist__c and in the value select the 'Objone__c.ObjectTwo__c.Picklist__c
7. Then activate your process builder

All Answers

KaranrajKaranraj
You can do that using Process Builder in salesforce.

1. Goto Setup->Create->Workflows & Approvals -> Process builder
2. Click "NEW' and enter the name for the process
3. Select the Objone__c and action as 'Whene a record is created or edited'
4. In the add criteria enter RecordType = 'X'
5. In the action select 'update record' and the chose the object Objecttwo__c
6. Under the field selection select the your Objtwo__c.Picklist_existing__c and in the value select the 'Objone__c.Picklist__c'
7. Then activate your process builder

To know more about process builder check this link (https://developer.salesforce.com/trailhead/business_process_automation/process_builder
GasparGaspar
Hey Karanraj, thanks for the response. I don't think this will work on process builder because it needs to fire on create/edit of ObjOne__c, pulling existing fields from the selected ObjTwo__c.

In actual terms, when creating a Transaction record where RecordType = "Existing Customer", the "Customer Type" picklist field needs to be automatically populated with a picklist value from the selected Customer. 
KaranrajKaranraj
Sorry I got confused. Which is parent Object here? If ObjectOne__c is child record and Objtwo__c, then in the step 5 choose 'ObjectOne__c' for update records and update the ObjectOne__c field from Objecttwo__c
GasparGaspar
Sorry for the confusion. It's a lookup relationship from Objectone__c to Objtwo__c. In real terms, a Transaction (ObjOne) is created and you link that to an existing Customer record (ObtTwo) in the system. Basically, when creating this I need the existing Customer_c.Picklist__c field to populate a Transaction__c.Picklist__c field (they both have the same values. 
KaranrajKaranraj
If that is the case, then you can do it using process builder itself

1. Goto Setup->Create->Workflows & Approvals -> Process builder
2. Click "NEW' and enter the name for the process
3. Select the Objone__c(Transaction) and action as 'Whene a record is created or edited'
4. In the add criteria enter RecordType = 'X'
5. In the action select 'update record' and the chose the object Objone__c(In the example I have used account object)

User-added image


6. Under the field selection select the your Objone__c.Picklist__c and in the value select the 'Objone__c.ObjectTwo__c.Picklist__c
7. Then activate your process builder
This was selected as the best answer
GasparGaspar
Is there a reason why, on step 5, Picklist__c field does not show up in the list of available fields in the Transaction object?
KaranrajKaranraj
Please find the screenshot  below to select the fields

In the popup just click on the object name and then click save
User-added image 

Then in the next step, you will be able to select fields from that object
User-added image

 
GasparGaspar
Built, tested and implemented - thanks!