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
kshannonkshannon 

Workflow Question: Can a newly created Record Id be the Field Update?

Hey,

 

So here is the scenario:

 

I have a custom object that is running the workflow rule: Object A

When I create a record for Object A, I would like the ID of that record to be the field update on the related Contact Record.

 

Is this possible to acheive? I have not been able to see a way to do so without code.

 

Thanks,

Kyle

sales4cesales4ce

Kyle,

 

Workflows do not work cross objects. You can only update fields on the object the workflow is associated with.

You would need a trigger to update the contact record. An example ,  See here  

Hope this helps.

 

Thanks,

Sales4ce

kshannonkshannon

Thanks, I assumed it wasn't possible but figured I would ask..

 

Do you potentially have a trigger that is more appropriate to the scenario at hand? It would be an after insert that updates the associated contact... If not its cool, not too hard to write up.

 

Kyle

sales4cesales4ce

Kyle,

 

My apologies. workflows DO work on cross objects starting spring'12 release.( Its friday and i do not know what i was thinking when i posted earlier).

 

so in your use case if the custom object is related to contact object, you should be able to update the Id using workflow. see this example

 

Thanks,

Sales4ce