how to use the polymorphic option in tSalesforceOutputBulkExec

Five Stars

how to use the polymorphic option in tSalesforceOutputBulkExec

Hi Everyone,

 

I need to do lookup for one field (say ownerid) on multiple objects (user and group) in the component 'tSalesforceOutputBulkExec'. I have the relationship name, external id, lookup field in talend but i am facing issues with the field Module name.

 

Could you please suggest me how to use the polymorphic option in tSalesforceOutputBulkExec and how to set the module names field?

 

 

Regards,

Pragyawan


Accepted Solutions
Forteen Stars TRF
Forteen Stars

Re: how to use the polymorphic option in tSalesforceOutputBulkExec

Did this help?
If so, thank's to mark your case as solved (Kudo also accepted).


TRF

All Replies
Forteen Stars TRF
Forteen Stars

Re: how to use the polymorphic option in tSalesforceOutputBulkExec

Hi,

You need to tick the "Polyporphic" option only when the field associated to the relationship may contain reference to different objects.

This capability is currently reserved for Salesforce standard objects and standard fields.

This the case of Task object and What field which may contain reference to Account, Opportunity or others.

So, suppose you want to load some Task records attached to their Opportunity, just tick the "Polyporphic" option and enter "Opportunity" for the "Module Name".

What if you want to load some Task records attached to their Account? Just tick the "Polyporphic" option and enter "Account" for the "Module Name".

What if you want to load some Task with some records attached to their Opportunity and others to their Account?

You need to have 2 distinct subjobs, there is no way to merge both cases into a single data flow to address to Salesforce.

That's life! 


TRF
Five Stars

Re: how to use the polymorphic option in tSalesforceOutputBulkExec

Thanks TRF!!!

 

I am facing the 3rd case where some records are from opportunity and others from account. What if i use a reference table as a lookup where we have all the data (both for opportunity and account mixed) and on the basis of that we upsert it? What would you suggest? 

I was just trying for a different approach. It would be great if you could give your views on the same regarding its feasibility and performance.

 

 

Regards

Pragyawan

Forteen Stars TRF
Forteen Stars

Re: how to use the polymorphic option in tSalesforceOutputBulkExec

That's the last point of my answer.

You need to have 2 distinct subjobs as there is no way to merge both cases into a single data flow to address to Salesforce.

You need to be able to split the input data into 2 separate flows then have 2 calls to tSalesforceOutputBulkExec.

I suggest you to have a look at the CSV file associated to the tSalesforceOutputBulkExec component; you'll see how the lookup is managed in case of a polymorphic association.


TRF
Forteen Stars TRF
Forteen Stars

Re: how to use the polymorphic option in tSalesforceOutputBulkExec

Did this help?
If so, thank's to mark your case as solved (Kudo also accepted).


TRF
Five Stars

Re: how to use the polymorphic option in tSalesforceOutputBulkExec

It helped a lot. Thanks