[Event Request] CRM integration
The requested events and functions to make external in the attached document (and sample objects) enables the following:
- Changing the standard sync relations between BC and CRM. With these changes you can take control over the default table/field mappings and e.g. replace the Customer<->Account sync with a custom table instead of the customer table. It's also possible to change sync behavior of individual fields, add fields etc.
- Control what happens when there are conflicting changes. Maybe you don't want to babysit conflicts and instead decide that when in conflict either BC or CRM overrules the other part.
- Do preprocessing before sync Sample objects.zip Event requests in CRM sync.docx
Thank you for your suggestion. This is not a single event request but larger ask. I've created work item for our Integration team and it will be included into our planning for next version.
Thank's.
Yes it's quite big since the current CRM-sync isn't very "evented" and it's difficult to do a custom sync setup. I've upgraded the customers database now and the only place we have custom code now is in these codeunits. With this fixed we can move to AL in the next upgrade.
After some testing I have a change in how to automatically resolve conflicts. I have attached an updated document. Event requests in CRM sync.docx
Yes, very much needed. @JesperSchulz what release is this planned for?
Hi @AlexanderYakunin,
can you make this happen for BC Version 15? And why even wait? Don't you what us Partner extend the CRM Connector to all CRM Modules like Customer Service, Field Service and Project Service Automation for happy Cloud Customers?
I like to add some more: Codeunit 5332:
[External] Lookup(CRMTableID : Integer;NAVTableId : Integer;SavedCRMId : GUID;VAR CRMId : GUID) : Boolean
IntTableFilter := GetIntegrationTableFilter(CRMTableID,NAVTableId);
//+++ BEGIN +++
OnBeforeLookup(CRMTableID, NAVTableId, SavedCRMId, CRMId, IntTableFilter, LookupOkValue, Handled);
IF Handled THEN
EXIT(LookupOkValue);
//--- END ---
Codeunit 5332:
[External] ResetConfiguration(CRMConnectionSetup : Record "CRM Connection Setup")
[...]
ResetDefaultCRMPricelevel(CRMConnectionSetup);
//+++ BEGIN +++
OnAfterResetConfiguration(EnqueueJobQueEntries);
//--- END ---
IF ConnectionName <> '' THEN
TempCRMConnectionSetup.UnregisterConnectionWithName(ConnectionName);
[...]
[External] GetCRMTableNo(NAVTableID : Integer) : Integer
//+++ BEGIN +++
//Handled Pattern insted:
OnBeforeGetCRMTableNo(NAVTableID, CRMTableId, Handled);
IF Handled THEN
EXIT(CRMTableId);
//--- END ---
[...]
[External] GetNameFieldNo(TableID : Integer) : Integer
//+++ BEGIN +++
OnBeforeGetNameFieldNo(TableID, FieldNo, Handled);
IF Handled THEN
EXIT(FieldNo);
//--- END ---
[...]
[External] GetTableIDCRMEntityNameMapping(VAR TempNameValueBuffer : TEMPORARY Record "Name/Value Buffer")
TempNameValueBuffer.RESET;
TempNameValueBuffer.DELETEALL;
[...]
// Only CRM
AddEntityTableMapping('incident',DATABASE::"CRM Incident",TempNameValueBuffer);
AddEntityTableMapping('quote',DATABASE::"CRM Quote",TempNameValueBuffer);
//+++ BEGIN +++
OnAfterGetTableIDCRMEntityNameMapping(TempNameValueBuffer);
//--- END ---
[...]
LOCAL [IntegrationEvent] OnAfterResetConfiguration(EnqueueJobQueEntries : Boolean)
LOCAL [IntegrationEvent] OnBeforeGetCRMTableNo(NAVTableID : Integer;VAR CRMTableId : Integer;VAR Handled : Boolean)
LOCAL [IntegrationEvent] OnBeforeGetNameFieldNo(TableID : Integer;VAR FieldNo : Integer;VAR Handled : Boolean)
LOCAL [IntegrationEvent] OnAfterGetTableIDCRMEntityNameMapping(VAR TempNameValueBuffer : TEMPORARY Record "Name/Value Buffer")
We are in the process of adding the events for the upcoming release.
Thanks Anders
Sounds great! Please see the document I posted feb 19.
@AndersLarsen65 CU or have we wait until the wave 1 2020?
I am afraid you will have to wait until wave 1 2020. we are turning the cds integration for the upcoming release with the focus on improved mapping and SaaS capability for extending integration to CDS including improvement of the tooling.
@AndersLarsen65 Do plan to make the table type CRM/CDS extendable?
Answer from Anders on Yammer:
"For wave 1 we will make the existing proxy tables (CDS/CRM) extensible. Transform payment term and shipping method from option to extensible enum. Adding transformation extensibility for “mapping” by kicking in the datatransformation framework plus allowing custom code to kick in if needed"
Closing issue based on that comment. Please open new issue, if you have further requests or questions :-)