Hi Experts,
I need to synch data from Business Central ("Item Unit of Measure" Table) to CRM (New Customized Table same structure like BC table).
I used CDS setup for this but not able to synch this because of this table is not showing in Table Mapping in CDS.
So, I go with AL Code level but NAV integration concept is not working in Business Central OnCloud because of DotNet variable not supported in Business Central AL code.
So, I need your help/suggestion how I can achieve this, I have CRM webservice/api having data form in JSON, below are API url from CRM...
1)
https://[ORG URI].api.crm4.dynamics.com/XRMServices/2011/Organization.svc?wsdl
(this have all webservices inside the CRM)
2)
https://[ORG URI].crm4.dynamics.com/api/data/v9.1/beg_itemunitofmeasures
(this is a particular table access url from CRM called as Item Unit of Measure in CRM this is customized table and having same fields and structure same like BC table of Item Unit Of Measure)
I need to understand how to make above API Authentication in Business Central in AL code and how to synch data from BC to CRM using these API.
Thanks in Advance.
Answers
dotnets are not supported anymore but in AL you can connect to WS.
You can use AL "functions", use for example "waldo´s pack":
https://www.waldo.be/2019/12/05/waldo-restapp/
Also you can use this piece I use.
I just the case 0: but it is handy to have the other methods. You just need request url formed and username/pwd
CallService('myproject', vWSURL, RequestType, payload, T50049.UserName, T50049.Password);
And this is an example to write JSON, (I cleared a bit the names because points to real work). To read it I haven´t used but you will find it: vJsonObject.ReadFrom()
Then, if you want to happen every time they change something in 5404 table, just create an event subscriber.
I hope all this is useful to whatever you are trying to do (send/receive data from nav).