AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 05.11.2008, 00:58   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
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, напишите личное сообщение администратору.
 


Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 14:57.