Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

[resolved] Management of lookup fields for CRM Microsoft Dynamics 2015 ON PREMISE

Highlighted
One Star

[resolved] Management of lookup fields for CRM Microsoft Dynamics 2015 ON PREMISE

I switch to an ON LINE option of the tMicrosoftCrmOutput connector to the ON PREMISE CRM 2015 Microsoft Dynamics option.
I did not see any more the lookup fields management (at the bottom of the Simple Parameter tab window).
How do I now manage these lookup fields ?
The problem is that it  is not compiling with database type LOOKUP  :
(type mismatch cannot convert from String to Document, the method setId(Guid) in the type EntityReference is not applicable for the arguments (void)
and this is not working  (runtime error :com.microsoft.schemas.xrm._2011.contracts.services.IOrganizationServiceUpdateOrganizationServiceFaultFaultFaultMessage: System.InvalidCastException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #C61D300A) 
with databases type STRING or GUID  (InvalidTypeCast).
So I have no solution. Somebody has an idea ? 
 
Highlighted
Moderator

Re: [resolved] Management of lookup fields for CRM Microsoft Dynamics 2015 ON PREMISE

Hi,
On which official build version did you get that? What does your input flow look like? Is there any more error exception printed on console?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
One Star

Re: [resolved] Management of lookup fields for CRM Microsoft Dynamics 2015 ON PREMISE

Hi, 
Things have evolved from my post, but it still does not work.
As said before, the problem is with the tMicrosoftCrmOutput connector, authentification type ON PREMISE, version CRM 2015, 
when trying to update a lookup field in an entity.
I found no documentation about this problem (!!!), so I tried to understand the Java code generated by Talend: it seems that it is waiting a XML structure for a lookup field value.
I have also upgraded the TOS for ESB version to 6.1.0.20151209_1337
So I am trying to upgrade the lookup field parentaccountid (Java type : String, Database  type : Lookup) of the opportunityid entity
The value passed is :
"<entity_reference><guid>222f7f2c-b392-e511-80c3-005056923d91</guid><logical_name>account</logical_name><name></name></entity_reference>"
No error or exception now is returned by the CRM, but the upgrade (of the field parentaccountid) is not done (!!!)
So am I doing the right thing to update a lookup field ?
Where can I find some documentation ?
Hope you may help me.
Regards.
   Trimok
Highlighted
One Star

Re: [resolved] Management of lookup fields for CRM Microsoft Dynamics 2015 ON PREMISE

Ok it works now (I thought the upgrade was not done, but I was wrong)
So, passing xml value like : 
<entity_reference><guid>222f7f2c-b392-e511-80c3-005056923d91</guid><logical_name>account</logical_name><name></name></entity_reference> 
for a lookup field, is correct.
Please put the information in the documentation, please !!!
Highlighted
Moderator

Re: [resolved] Management of lookup fields for CRM Microsoft Dynamics 2015 ON PREMISE

Hi,
 We find a related jira issue about tMicrosoftCrmOutput for a lookup field
https://jira.talendforge.org/browse/TESB-16835
Thanks for your feedback and sharing your solution with us.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Five Stars

Re: [resolved] Management of lookup fields for CRM Microsoft Dynamics 2015 ON PREMISE

I'm trying this same thing but I wonder how I have to define the fields in TMap. I cannot define a database type there. Or do I have to put a tjavarow component here ?
I tried to define the guid fields as string or as document but this doesn't help me.
<entity_reference><guid>9e46489f-af00-e211-b587-d48564531939</guid><logical_name>pricelevel</logical_name><name></name></entity_reference>

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog