I would like to extend the page web service, with another operation but with complex data types as input parameters (object class) like (customer, salesorder).
Then define your Object as Parameter of the function.
I have tested this example in msdn yet but, the extension operation (service.CapitalizeName(cust.Key)) takes the customer key as parameter (when calling the operation from client code) not the whole customer object.
The first parameter of the code unit function that extends a page should be the object that the page is based on (Customer). Your clients first parameter for that extended function is the key that you obtained when invoking the read operation on the page based web service. The web service will automatically give the object to your code unit. If you need to pass additional objects as parameters, I would pass record Id's.
Comments
Then define your Object as Parameter of the function.
I have tested this example in msdn yet but, the extension operation (service.CapitalizeName(cust.Key)) takes the customer key as parameter (when calling the operation from client code) not the whole customer object.
http://www.wmmatthewstreet.com
The best way to pass complex parameter to codeunit operation is to use the XMLPorts.
refer to :
http://www.kauffmann.nl/blog/index.php/ ... ervices-2/
https://community.dynamics.com/product/ ... vices.aspx
http://blogs.msdn.com/b/nav/archive/200 ... vices.aspx
viewtopic.php?f=32&t=29557
http://blogs.msdn.com/b/freddyk/archive ... stuff.aspx
https://community.dynamics.com/product/ ... 67809.aspx
Thanks a lot for your help.