You need to sign in to do that
Don't have an account?
Megachuckmc
Updating fields cross-record
I'm trying to create a Workflow rule which does the following:
When a new record is created the workflow will search to find a previously created record which is related to the new record and then take the value in a field from the new record and update the corresponding field on the old record.
Or more specifically...
1) When a new Sales Order is created in my ERP system our integration tool creates a "Sales Order" record in Salesforce. We are using the Scribe integration tool and Sales Order object that they have implemented.
2) One of the fields on the Sales Order record is "Fulfillment Date" which comes over as blank. Weeks later when the order actually ships the ERP creates an "Invoice" record in Salesforce in which the "Fulfillment Date" is now filled in with the shipping Date.
3) There is a field on both the Sales Order and Invoice record called "Master Number" which effectively ties these two records together.
What I want to be able to do is take the value from the "Fulfillment Date" field on the Invoice record and populate it onto the "Sales Order" record.
Any help or suggestions would be greatle appreciated!
Mike
Unfortunately a cross-object workflow is not currently possible, nor is it possible to have a formula field take a value from a child record...
This can however be done with an Apex Trigger if you have a developer or if you feel like learning Apex. Because this is a fairly simple Apex Trigger, it may be a good one to cut your teeth on.
- Jeff
That said, what you want to do would be to actually modify the parent record based on the child record which is not currently possible (the reason for this is that a record can have one parent, but multiple children, thus it would be impossible to tell which child to look at in a cross object workflow or formula).
An Apex trigger is still your best bet, but if it is always going to be a 1:1 ratio of Sales Order to Invoices, and if you have an integration expert on hand, it may be possible to effectually flip the two objects. What I mean is have a lookup to the Invoice on the Sales Order, and when the invoice comes in the integration tool could populate the Invoice lookup on the Sales Order object with the Id. Then, you could have a formula field look at the Fulfillment date.
I'll be anxious to see what you go with =)