Hi Martin,
Here is the method signature I have in X++ class:
public List downloadInvoices(List _summaryInvoiceIdList)
{
System.Byte[] bytes;
System.IO.MemoryStream stream;
List summaryInvoiceIdList, summaryInvoiceListBytes;
ListEnumerator listEnumerator;
summaryInvoiceIdList = new List(Types::String);
summaryInvoiceListBytes = new List(Types::AnyType);
summaryInvoiceIdList = _summaryInvoiceIdList;
listEnumerator = summaryInvoiceIdList.getEnumerator();
while (listEnumerator.moveNext())
{
bytes = SummaryInvoiceHelper::generateSummaryInvoice(listEnumerator.current());
summaryInvoiceListBytes.addEnd(bytes);
}
return summaryInvoiceListBytes;
}
Trying to use the following code for deserialization, but not exactly sure if it works. Please confirm if it is the right approach:
obj = Newtonsoft.Json.JsonConvert::DeserializeObject(_summaryInvoiceIdList);
summaryInvoiceIdList = obj;
Let me know if you need further info.
Thanks,
Baber.