Page 1 of 1

Committing related Records

PostPosted: Mon Jun 18, 2012 1:40 pm
by phcranston
In order for some lookups to occur properly on a related record I need to commit the record when pulling from the host. I'm pulling down a "Job" record with related "LineItem" records.

I see the section about "Forcing Lookups" listed here: http://www.seedcode.com/pmwiki/pmwiki.p ... eldMapping

But the instructions don't seem to match up with the files. Could you elaborate how this should be done?

Thanks

Re: Committing related Records

PostPosted: Mon Jun 18, 2012 2:08 pm
by John Sindelar
Hi there,

You just want to make sure you've committed the parent record before you set any of the child fields that need to lookup from the parent. All this means is putting a Commit Record script step in the Set Field script that sets the parent record's fields: put it at the end after you've set all the Job fields (in this case). That way, when your LineItem fields get set, then job record is there to be looked up from.

Hope that helps,

John

Re: Committing related Records

PostPosted: Wed Jun 20, 2012 2:11 pm
by phcranston
thanks. Got it working