Developer forum

Forum » Feature requests » Business Central Integration : Filtering Contacts when using Business Central Plugin Unit

Business Central Integration : Filtering Contacts when using Business Central Plugin Unit

Søren Bøgelund
Reply

Hi

I have a Customer Case, where the contacts in Business Central are linked to users in DynamicWeb. But not all of the contacts in Business Central are users in DynamicWeb, so I would like to be able to filter the contacts before they are synched to DynamicWeb. Maybe it could be done by adding an extra event publisher as depicted in the attached file?

/Søren

FilteringContacts.png

Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Soren,

we have anotther solution that you can already use without any additioanl feature developed. We have "OnBeforeExecuteRequest" subscriber event where we can
implement completely custom xml being returned. There is an example of that in the examples solution: look in the DynamicwebGlobalSubscriber.al file for a sample code 
that returns the "Company" xml, so you can simply change it to return all contacts/filtered contacts xml from BC for your purpose.
If needed I can sent you the mapping code we use for generating contacts xml for our current requests.
BR, Dmitrij

 
Søren Bøgelund
Reply

Hi Dmitriy

Thank you very much for your helpful answer. Could you please send me the mapping code for generating the Contact xml?

/Søren