Issue in CURFIELDNO Function (NAV) - WEB SERVICE

Ravi_Thakkar
Member Posts: 392
Hello All,
I just found that, if I go through WEB to access the WEB-SERVICE in NAV at that time,
CURRFIELDNO function will always occupy 0 (Zero) value, which will affect some Business Logic or Technical Logic wrongly.
E.G. I tried to update "Qty. To Ship" field through WEB by using Web Service of Sales Order Sub Form. Refer the attached diagram of code in NAV containing CURRFIELDNO function call.
As a general behaviour, CURRFIELDNO will always contain 0 value on accessing it through WEB.
So, I think it will affect Business Logic badly sometimes, whenever there is a use of this Function. (Please Suggest)
Is there any other option to make it work, properly?
Thanks in Adv.
I just found that, if I go through WEB to access the WEB-SERVICE in NAV at that time,
CURRFIELDNO function will always occupy 0 (Zero) value, which will affect some Business Logic or Technical Logic wrongly.
E.G. I tried to update "Qty. To Ship" field through WEB by using Web Service of Sales Order Sub Form. Refer the attached diagram of code in NAV containing CURRFIELDNO function call.
As a general behaviour, CURRFIELDNO will always contain 0 value on accessing it through WEB.
So, I think it will affect Business Logic badly sometimes, whenever there is a use of this Function. (Please Suggest)
Is there any other option to make it work, properly?
Thanks in Adv.
0
Comments
-
This is the same behavior if you create a sales line through code in C/AL. Currfieldno would be zero as well.0
-
Hello,
Thanks for the reply.ara3n wrote:This is the same behavior if you create a sales line through code in C/AL. Currfieldno would be zero as well.
While through NAV side, on doing the same task, CURRFIELDNO field value will be 18.
Refer the Attched for clear idea.
Please, suggest me if any sollution.
Thanks.0 -
what I'm trying to say that, if you write c/al code.
Salesline.get(Salesline."Document type"::Order,'docno',10000); Salesline.validate("Quantity to ship",12); Salesline.modify(true);
Currfieldno is zero. web service is no different.0 -
But, through SalesOrder form, in NAV, if you change the field value Qty To Ship, then CURFIELDNO will have 18 value, since it is a form function.
If I have designed the same form on WEB and To provide the same value to that function, what should I do?0 -
Yes, but from NAV point of view the change is done through code, not by user interactively, and this is the difference. You need to count with it, if the system works differently when code change the value or user change the value, it is bad design. This variable is good for not calling some triggers or functions when the value is changed by code (e.g. to not show some warnings etc.) but not to change the business logic. It must be same in both ways else you can have inconsistent data.0
-
As far as bad design, that's arguable.
In his case, the user is actually entering the sales order, but not through RTC, but through some web front end, and he has integrated it through webservice.
That is why he is expecting the same result. But there are other issue he will run into. For example Nav runs the validating at the time of insert. So you can't control the sequence of what get validated.0 -
Yes, you are exactly right.
You exactly got my requirement.ara3n wrote:As far as bad design, that's arguable.
In his case, the user is actually entering the sales order, but not through RTC, but through some web front end, and he has integrated it through webservice.
That is why he is expecting the same result. But there are other issue he will run into. For example Nav runs the validating at the time of insert. So you can't control the sequence of what get validated.
Any Suggestion?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions