Hi,
I have C# app which have to use function from Codeunit which have to modify some fields.
Here is a code from app..
Here is function from Codeunit..
I test app, and it works when, return some value in label or textbox, but when should to modify fields in nav doesnt work.
Help
Answers
Opened the NAV debugger to see what happens?
This is the error in Event Viewer
Can you show me how you resolve this problem ?
NetworkCredential cr = new NetworkCredential("userName", "password", "domain");
wst.Credential = cr;
Use those 2 lines instead of the UseDefaultCredential. Didn't try it now but it should work.
Dont work again . When i add return parametar in my Codeunit function,
GetLocation(LotNo,loc) return Test:text, Test:= LotNo+Loc, and edit my C# app label.text=GetLocation(Lot,Lok), program works, app return value, but didnt want to modify field in NAV.
Only want to return value
Rather than having the function return a Text, modify it so the functions returns nothing, but has a seperate VAR parameter of TEXT, then in your c# code, you pass a seperate string as a ref.
So the c# code would look like, i have boxed the 2 changes, just make sure you change the NAV side function and update your web reference
Try that.
Regards
Roland