I have a BO (Import.BO) that I use to hold imported data that I want to link to an existing BO (Contact.BO).
I have a process that inserts the Contact.BO to the Import.BO (1:1 relationship) that works only when I run it from an individual Import.BO record.
“InsertContact” Process code:
FIND Contact WHERE Contact.Email=Import.Email
INSERT Contact IN Import.ContactLink
I thought if set up a process like below I could run the InsertContact Process on all the Import.BO records.
Mulit_Insert Process code:
FIND Import WHERE Import.State=‘existing’ IN BATCHES OF 1
InsertContact (process above)
But the log is telling me that “Value of the attribute Email of object Import could not be resolved”.
I’m obviously missing a step that puts the record in context. I tried using “ThisImport.Email” and “ThisContact” with no luck.
What I’m I doing wrong?
Need advice for Context in a Process [Solved]
Need advice for Context in a Process [Solved]
Last edited by Andrea on Tue Jun 30, 2020 4:00 pm, edited 1 time in total.
Andrea
Re: Need advice for Context in a Process
Hi Andrea in Canada - nice to hear from you - glad you're still around!
So I think its telling you that because there is no instance in context.
Is this immediately after the import? if so, a COMMIT TRANS... will help as those recs may not be posted yet.
And if its a standalone process, then try removing the IN BATCHES OF 1 and just call a "_b" process with IMPORT as Input, and it will feed all the found Import recs to the child process.
The logger will then show ID #s of the eligible recs (and the FIND will show a count) and you'll see more about whats happening (or not) behind the scenes.
So I think its telling you that because there is no instance in context.
Is this immediately after the import? if so, a COMMIT TRANS... will help as those recs may not be posted yet.
And if its a standalone process, then try removing the IN BATCHES OF 1 and just call a "_b" process with IMPORT as Input, and it will feed all the found Import recs to the child process.
The logger will then show ID #s of the eligible recs (and the FIND will show a count) and you'll see more about whats happening (or not) behind the scenes.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Need advice for Context in a Process
Hey Jaymer, yes I'm still here
I've set up my import so that it dumps to a BO so I can clean up the data and run some processes before I either create a new Contact or modify an existing Contact (the data contains a mix of both). So yes, the records are there. I want to insert the matching Contact (based on email address) to the Import.BO to create the relationship so that I can compare/modify the records and create child records for the Contact based on the Import.BO record. (The Import.BO record contains data for the Contact and for the creation of a child record for that Contact).
If I open an Import.BO record and run a process to insert the Contact it works. If I run a stand-alone process to find each Import.BO record and run the insert Contact process, it doesn't work.
The IMPORT suggestion is interesting. Are you saying that I should connect the Contact I'm trying to find when I import the data to the Import.BO? I was hoping to connect after my data was imported and cleaned up, hence the "temp" Import.BO
I thought this would a simple process to write...nope Is there any other way to do what I want to do?
Thanks for your help on this
I've set up my import so that it dumps to a BO so I can clean up the data and run some processes before I either create a new Contact or modify an existing Contact (the data contains a mix of both). So yes, the records are there. I want to insert the matching Contact (based on email address) to the Import.BO to create the relationship so that I can compare/modify the records and create child records for the Contact based on the Import.BO record. (The Import.BO record contains data for the Contact and for the creation of a child record for that Contact).
If I open an Import.BO record and run a process to insert the Contact it works. If I run a stand-alone process to find each Import.BO record and run the insert Contact process, it doesn't work.
The IMPORT suggestion is interesting. Are you saying that I should connect the Contact I'm trying to find when I import the data to the Import.BO? I was hoping to connect after my data was imported and cleaned up, hence the "temp" Import.BO
I thought this would a simple process to write...nope Is there any other way to do what I want to do?
Thanks for your help on this
Andrea
Re: Need advice for Context in a Process
will be able to help you knock this out with a skype or zoom call on Tue.
skype: JaymerJaymer or email zoom invite to jaymer at me.com
skype: JaymerJaymer or email zoom invite to jaymer at me.com
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Need advice for Context in a Process
Code: Select all
I thought this would a simple process to write...nope
So instead of starting off with a process, rather create a rule on the IMPORT object using IF Object IS NEW. When the import object is created, the rule will be fired linking your Contact object based on your Object rule criteria. (sometimes depending on the objective and complexity you may have to refer to a process in your Object rule. )
I have some very complex Import routines that rely on a business rule taking over from the initial object creation, in some cases initiating the creation of other new objects which in turn fire similar object rules achieving a formidable result .
Re: Need advice for Context in a Process
Thanks Jaymer - I will reach out to you today.
ACDC - That's a great tip. I was trying to use business rules after the data was imported, not during importing/creation. Sounds like that is the better way to go. Thank you
ACDC - That's a great tip. I was trying to use business rules after the data was imported, not during importing/creation. Sounds like that is the better way to go. Thank you
Andrea
Re: Need advice for Context in a Process [Solved]
Apparently I've been surviving all these years without using the feature of "input" in a process. Jaymer introduced me (thank you). Glad it was something simple Now to put my new knowledge to work.
Andrea