BC and CRM Integration
Hi there,
I got a question regarding extending the bc and crm integration.
Has anyone had trouble getting the option set based coupling to work for custom fields?
So for example like Microsoft did for "Sales Header"."Payment Terms Code" -> "CRM Salesorder".PaymentCodeTermsEnum field.
A client of mine wanted me to sync a code field to a custom picklist field in crm.
So JaI implemented it like Microsoft did for payment terms and the initial
coupling both manually coupling and match based coupling worked the
records were indeed coupled.
But when the sync engine began to start syncing the data between those records I got error messages from the CRM side.
The error message essentially telling me something like this.
"Microsoft.Dynamics.Nav.CrmCustomizationHelper.CrmHelper.UpdateOptionSetMetadataWithLanguageCode"
with the following error messagfe: For OptionSet MyCustomOptionSetName:
Cannot access indirectly the option set and option values using the
entity and attribute name because the option set is not Local."
So I got confused, and googled a bit to essentially get to the conclusion that there are global choices and local choices in CRM, and I guess microsofts implementation for option based coupling is targeted only for "local choices"?
So what I'm still confused about is do I have to map the ordinal values and names of my enum field in my custom integration 1:1 to the CRM Option-Set members so they match
exactly when its a global choice field?
Because right now my enum field on my CRM-proxy table that is used for the integration does only contain a enum field with "dummy" placeholder values that do not actually exist in CRM.
Because I thought that the framework is handling the resolution of already coupled "Codes" -> Option IDs via the "CRM Option Mapping" table in BC where the Record-ID of BC is used to lookup the "Option Value" (Integer) so the actual Ordinal value of the option set in CRM and "Option Value Caption" for its display value.
But my understanding now is with global choices I don't have to implement
the option based coupling/mapping but rather match the enum values 1:1
and then write custom code that maps the ordinal value (CRM Proxy-Table)
-> Code field in BC by handling it in "OnTransferFieldData".
Which I'm even more confused because there is actual code that should handle
my scenario in the functions of "ConvertTableToOption" and "ConvertOptionToTable" in "CRM Int. Table Subscriber" → "OnTransferFieldData".
If you could help me out or elaborate if I'm right about my assumption that I have to actually start over and implement "custom" logic for resolving the mapping, or If local and global choices are actually meant to be synced by the option based coupling + the functions
"ConvertTableToOption", "ConvertOptionToTable".
Any help would be really appreciated!
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions