You need to sign in to do that
Don't have an account?

compare two fields and then update a third
I have two objects linked with a lookup field.
On each object is a field called "reciept number" (that is unique).
On one object the information comes in through an automated process. My hope is to build something that compares the two "reciept number" fields and if it finds a match, it populates the look upfield with the Salesforce Unique ID number for that record (to link the two records).
Try as I might, I haven't been able to find anything that discusses how this can be done.
Any help in pointing me in the right direction would be greatly appreciated.
On each object is a field called "reciept number" (that is unique).
On one object the information comes in through an automated process. My hope is to build something that compares the two "reciept number" fields and if it finds a match, it populates the look upfield with the Salesforce Unique ID number for that record (to link the two records).
Try as I might, I haven't been able to find anything that discusses how this can be done.
Any help in pointing me in the right direction would be greatly appreciated.
It seems like you need a trigger to do this. If you create an insert trigger on the object that gets the receipt number through the automated process, you can query the other object to find matching receipt numbers and relate them together.
Here's a prototype trigger you can use as a reference. I just used accounts and contacts as an example.
Let me know if you have any questions!