![]() |
#1 |
Участник
|
A number of people have asked for guidance on how to transfer data to/from COM and WebServices in NAV 2009.
I the following I will go through how to get and set a picture on an item in NAV through a Web Service Connection. I will also show how you can create an action in NAV, which allows you to transfer a picture from an item to Paint (on the Client) modify it and Save it back into NAV. During these scenarios we will run into a number of obstacles - and I will describe how to get around these. First of all - we want to create a Codeunit, which needs to be exposed to WebServices. Our Codeunit will contain 2 functions: GetItemPicture and SetItemPicture - but what is the datatype of the Picture and how do we return that value from a WebService function? The only datatype (supported by Web Services) that can hold a picture is the BigText datatype. We need to create the following two functions: GetItemPicture(No : Code[10];VAR Picture : BigText) SetItemPicture(No : Code[10]; Picture : BigText); BigText is capable if holding binary data (including null terminals) up to any size. On the WSDL side these functions will have the following signature: xxxxx As you can see BigText becomes string - and strings in .net are capable of any size and any content. Подробнее
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|