Dear All,
Below is my scenario,
Aim : To Maintain a copy of navision tables 'item category' and 'Product Group' in CRM Online 2016.
Steps Taken :
1. Created one entity for Item Category and another for Product Group in CRM.
In Product Group Entity the field 'item Category' is of type Lookup with relation to Item Category entity.
2. Created two tables in navision of type CRM using New-NavCrmTable cmdlet.
3. All Integration table mapping and field mapping setup done. Created coupling pages and logic as per msdn.
4. Created new item category Code and selected to create new item category Code in CRM from coupling page. Successfully created in CRM and coupled
5. Now the aim is to synchronize Product group record with CRM. In CRM the 'item category' field in the Product group entity is a field of type lookup. Same field in NAV CRM table will be of type GUID.
6. Have added a subscriber event to OnBeforeInsertRecord -> Codeunit Integration Table Synch. Inside the function added code to assign GUID value to 'itemcategory' field in 'Product group' Navision table(CRM type)
7. Now created a new product group and initiated sync process. After the Insert trigger is executed, the GUID value assigned to the field 'itemcategory' gets cleared. So the Product group record gets created in the CRM without item category code.
So my query here is, how to pass the Item Category Code to CRM where it is a lookup field ?
or rather how to integrate lookup fields? Any help/advise is most welcome
Thanks
Siddharth
0
Comments