Getting error when opening list from another list form.

pushpraj1008
Member Posts: 33
Hi All,
I added "Description" button on Item Card. When user clicks on this button Form1 is opening based on some filters.
User selects some records, then press "OK" button, it should open another "Form2".
I'm getting the error while opening the form, though Form2 opens but it comes with error. Following code on
"On Push" of "OK" button.
CurrForm.SETSELECTIONFILTER(lRecItemDescTypes);
lRecItemDescTypes1.COPY(lRecItemDescTypes);
lRecItemDescCommentsTemp.DELETEALL;
IF lRecItemDescTypes1.FINDSET THEN
REPEAT
lRecItemDescComments.RESET;
lRecItemDescComments.SETRANGE("Item No.",gItemNo);
lRecItemDescComments.SETRANGE(Type, lRecItemDescTypes1.Type);
IF lRecItemDescComments.FINDSET(FALSE,FALSE) THEN
REPEAT
lRecItemDescCommentsTemp :=lRecItemDescComments;
lRecItemDescCommentsTemp.INIT;
lRecItemDescCommentsTemp.INSERT;
UNTIL lRecItemDescComments.NEXT=0;
UNTIL lRecItemDescTypes1.NEXT=0;
FORM.RUNMODAL(6041107,lRecItemDescCommentsTemp);
and error is attached.
Kindly guide me in this regard.
Pushpraj
I added "Description" button on Item Card. When user clicks on this button Form1 is opening based on some filters.
User selects some records, then press "OK" button, it should open another "Form2".
I'm getting the error while opening the form, though Form2 opens but it comes with error. Following code on
"On Push" of "OK" button.
CurrForm.SETSELECTIONFILTER(lRecItemDescTypes);
lRecItemDescTypes1.COPY(lRecItemDescTypes);
lRecItemDescCommentsTemp.DELETEALL;
IF lRecItemDescTypes1.FINDSET THEN
REPEAT
lRecItemDescComments.RESET;
lRecItemDescComments.SETRANGE("Item No.",gItemNo);
lRecItemDescComments.SETRANGE(Type, lRecItemDescTypes1.Type);
IF lRecItemDescComments.FINDSET(FALSE,FALSE) THEN
REPEAT
lRecItemDescCommentsTemp :=lRecItemDescComments;
lRecItemDescCommentsTemp.INIT;
lRecItemDescCommentsTemp.INSERT;
UNTIL lRecItemDescComments.NEXT=0;
UNTIL lRecItemDescTypes1.NEXT=0;
FORM.RUNMODAL(6041107,lRecItemDescCommentsTemp);
and error is attached.
Kindly guide me in this regard.
Pushpraj
Regards
Pushpraj
Pushpraj
0
Comments
-
Hi Pushpraj,
What is the PushAction of the "OK" button?
What I suspect is that it's LookupOK which will run the code in the OnPush trigger and then try to close the form. Change this to no push action and put a CURRFORM.CLOSE after the RUNMODAL.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