Retrieving current SalesLine record in RTC

hav
Member Posts: 299
Hi All,
I have added a new menubutton on Sales Order form/page and it has 'Edit' as one of the menu option. I have written following code in the OnPush() / OnAction() tirgger of 'Edit' menu option:
The purpose of this code is to fetch the currently selected SalesLine record when a user selects a salesline from the Sales Order subform of Sales Order Card/Page and do some processing based on the values it possesses.
In Classic Client, the above code execution sets CurrSalesLine var. properly to refer to the currently selected salesline on the Sales Order Card.
However in Role Tailored Client, the CurrSalesLine var. does not change according to the selection made on the Sales Order page. It always refers to the first salesline record present on the Sales Order page.
I am not sure why is the CurrSalesLine var. not set properly in RTC?
Is the GETRECORD() function not working for Page object.?
Any idea?
Regards,
Hemant
I have added a new menubutton on Sales Order form/page and it has 'Edit' as one of the menu option. I have written following code in the OnPush() / OnAction() tirgger of 'Edit' menu option:
Edit - OnAction() //Obtain the currently selected Salesline record from the Sales Line subform CurrPage.SalesLines.FORM.GETRECORD(CurrSalesLine); //CurrSalesLine-> SalesLine record var. .........
The purpose of this code is to fetch the currently selected SalesLine record when a user selects a salesline from the Sales Order subform of Sales Order Card/Page and do some processing based on the values it possesses.
In Classic Client, the above code execution sets CurrSalesLine var. properly to refer to the currently selected salesline on the Sales Order Card.
However in Role Tailored Client, the CurrSalesLine var. does not change according to the selection made on the Sales Order page. It always refers to the first salesline record present on the Sales Order page.
I am not sure why is the CurrSalesLine var. not set properly in RTC?
Is the GETRECORD() function not working for Page object.?
Any idea?
Regards,
Hemant
Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
0
Answers
-
-
Thanks for your reply.
I reviewed the topic on using Windows sendkeys to activate actions on subpages and i found it interesting.
But i am still not sure on how to retrieve the current sales line and use it for processing.
My 'Edit' action does not have a shortcut key and the new menubutton which i had added containing this action do appear in 'Related Information' menu of Sales Order page. It has not been Promoted nor it appears anywhere in the Lines Action flash button.Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)0 -
The problem is now resolved.
I used the workaround as suggested in http://www.mibuso.com/forum/viewtopic.php?f=32&t=35876
Thanks,
HemantRegards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)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