Any one with a C# sample code on how i can post a sales order that already exists in Dynamics NAV in C# ?
*This post is locked for comments
Any one with a C# sample code on how i can post a sales order that already exists in Dynamics NAV in C# ?
*This post is locked for comments
You're welcome.
And, please verify the answer to help other peoples.
Hello Nam.
You are a genius. It has worked like charm!!!
Come for coffee. dicky.tech@gmail.com
Hi Muleso,
IT is a property of function.
You can open Properties of that function and change value to No. Default is Yes.
Then, update WS on C# again. You can use that function. Note Web Service Name of Page and Codeunit must be the same.
Hi Nam,
This is my Extended code unit, how can remove 'LOCAL' from the PostOrder function seems that's the issue/
Documentation()
OnRun()
LOCAL PostOrder(Order : Record "Sales Header")
Order.Invoice:=TRUE;
Order.Ship:=TRUE;
CODEUNIT.RUN(CODEUNIT::"Sales-Post", Order);
Hi Muleso,
Please reference this link:
I'm successful for posting SO from C# via Web Service with this link.
The new code unit 8000 . Still doesn't work. Am using NAV 2017.
Documentation()
OnRun()
LOCAL PostOrder(Order : Record "Sales Header")
Order.Invoice:=TRUE;
Order.Ship:=TRUE;
CODEUNIT.RUN(CODEUNIT::"Sales-Post (Yes/No)", Order);
Hello,
Imagine it's NOT working.
I have created a new code unit, executing 81 and still when i expose it on web service and reference on C#, i can execute.
This might be also helpful: dynamicsuser.net/.../post-purchase-order-from-web-service
Try to use codeunit 80 or create extended as described in the article.
Seems when i expose my code units CANNOT execute post.
Code unit 81 exposes below.
<?xml version="1.0"?>
-<definitions xmlns:tns="urn:microsoft-dynamics-schemas/codeunit/oSalesPostYesNo" xmlns="schemas.xmlsoap.org/.../" targetNamespace="urn:microsoft-dynamics-schemas/codeunit/oSalesPostYesNo">
-<types>
<schema xmlns="www.w3.org/.../XMLSchema" targetNamespace="urn:microsoft-dynamics-schemas/codeunit/oSalesPostYesNo" elementFormDefault="qualified"/>
</types>
<portType name="oSalesPostYesNo_Port"/>
-<binding name="oSalesPostYesNo_Binding" type="tns:oSalesPostYesNo_Port">
<binding xmlns="schemas.xmlsoap.org/.../" transport="schemas.xmlsoap.org/.../http"/>
</binding>
-<service name="oSalesPostYesNo">
-<port name="oSalesPostYesNo_Port" binding="tns:oSalesPostYesNo_Binding">
<address xmlns="schemas.xmlsoap.org/.../" location="desktop-5hfj3o6/.../oSalesPostYesNo"/>
</port>
</service>
</definitions>
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,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156