Hi Qian,
i don't think BYOD is what i need.
As i mentioned before i want to send data from D365FO to another server.
I made a code where i call the API (first i get the authentication then i send the data).
Now in the method SendData, i prepare the header,request,body and response.
Now in preparing the body i do the following:
System.IO.Stream bodyStream;
public void Body(System.Net.WebRequest request, str body)
{
System.Byte[] byteArray = encoding.GetBytes(body);
request.set_ContentLength(byteArray.get_Length());
bodyStream= request.GetRequestStream();
bodyStream.Write(byteArray, 0, byteArray.get_Length());
}
Now as you can see the body here is string. So before calling the method body, i want to prepare my data to be in CSV,JSON or XML format.
So for example let's say i want to send the customerName and customerAccount, then i have to take this data and convert it to XML then take this data and send it to the body method. (i don't want the file i want the data format in string)
My question is how to convert it to XML or other formats. I read that in 2012 there was something that serialize query to XML in AIF.
So how should i send the data? should i send it as query then serialze the query to xml or csv or json? is this doable if yes how?