I Want to create a custom code unite in which it get the sales order no as a parameter and Release the sales order in NAV 2017.
Thanks in Advance
*This post is locked for comments
I Want to create a custom code unite in which it get the sales order no as a parameter and Release the sales order in NAV 2017.
Thanks in Advance
*This post is locked for comments
Thank you sir
you can use codeunit 80 to post sales documents.
add a new global function "Post(Rec : record "Sales Header")" in the new cu "Sales Lib":
add this code:
// maybe set flags Ship and Invoice from Rec here
SalesPost.RUN(Rec); // local variable SalesPost : codeunit : 80
after saving the cu, goto c# project and update web reference to get the new function in c# code
Thank YOU for your help Solved the error now it work perfectly Thanks.
sir one another Question how to post sales order from code?
when you click on that link, you see some xml structure in the IE (browser) ?
use the ip address instead of the computer name, in your case 127.0.0.1
sir i already used that url pc/.../SalesOrder
no error in the code as you told i did on the same way when i run the code then show the above error
did you publish the sales order page in the web service list in nav. you should get there a soap url, please check that, click there on the link, you should then get an xml structure shown in the browser. this link is to be used for the web reference.
when run the url has change and say page not found how to solve this sir Please sir i need your help
var order = client.Read(orderNo);
error detail {"Service \"CRONUS Canada%2C Inc./Page/SalesOrder\" was not found!"}
sir no error but when run the code error here var order = client.Read(orderNo);
error detail {"Service \"CRONUS Canada%2C Inc./Page/SalesOrder\" was not found!"}
you have to add a web reference, so right click the c# projects name, select add service reference, then in the dialog click on web reference, set there the soap url of the nav web service.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156