Function Call Issue

Lamba
Member Posts: 263
Hi,
As all know there is a Change Status function on Order, that works for individual order.
I have created a new list page,on which the status must change from Firm planned to Released, for the Order lines which are marked as True.
but when i call the std function it works for all available lines neglecting the setrange.
"To Release" is a boolean, the Change Status functionality must work for the lines marked true.
Code on OnAction trigger:
RecProdOrder.RESET;
RecProdOrder.SETRANGE(RecProdOrder."To Release",TRUE);
//***MESSAGE('RecProdOrder.Mark - %1',RecProdOrder."To Release");
IF RecProdOrder.FINDSET THEN BEGIN
REPEAT
CODEUNIT.RUN(5407,RecProdOrder);
UNTIL RecProdOrder.NEXT=0;
END;
As all know there is a Change Status function on Order, that works for individual order.
I have created a new list page,on which the status must change from Firm planned to Released, for the Order lines which are marked as True.
but when i call the std function it works for all available lines neglecting the setrange.
"To Release" is a boolean, the Change Status functionality must work for the lines marked true.
Code on OnAction trigger:
RecProdOrder.RESET;
RecProdOrder.SETRANGE(RecProdOrder."To Release",TRUE);
//***MESSAGE('RecProdOrder.Mark - %1',RecProdOrder."To Release");
IF RecProdOrder.FINDSET THEN BEGIN
REPEAT
CODEUNIT.RUN(5407,RecProdOrder);
UNTIL RecProdOrder.NEXT=0;
END;
0
Answers
-
I was missing a filter,
, now its working with following code:
RecProdOrder.RESET;
RecProdOrder.SETRANGE(RecProdOrder.Status,RecProdOrder.Status::"Firm Planned");
RecProdOrder.SETRANGE("To Release",TRUE);
IF RecProdOrder.FINDSET THEN BEGIN
REPEAT
CODEUNIT.RUN(5407,RecProdOrder);
UNTIL RecProdOrder.NEXT=0;
END;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