NAV RTC Development Tips
Here are my Microsoft Dynamics NAV RTC development tips, enjoy. Steve.
Properties of controls can now be set dynamically. (Well, more dynamically then before). For example, the cells in a column (in a grid) can have a different editable value for each row. I'll describe a quick example of how to do this.
In this example, I have added a new boolean (checkbox) field to the sales line called "Faulty Item Replacement". If this checkbox is checked (true), the price fields (unit price and line amount) should be set to zero, and made not editable. The setting to zero is the same as before - I wont discuss this bit. I'll discuss the rest. To do this, I:
- Added a new Boolean variable to the "Sales Order Subform" page called "PriceDetailsEditable", and set the "IncludeInDataset" property of this variable to true.
- Made a new function called "UpdatePriceDetailsEditable". This had one line of code in it: "PriceDetailsEditable := NOT "Faulty Item Replacement";"
- Added call to UpdatePriceDetailsEditable function in the OnAfterGetRecord event.
- Added call to UpdatePriceDetailsEditable function in "Faulty Item Replacement".OnValidate event.
- In the "Unit Price" and "Line Amount" fields, I changed the Editable property to "PriceDetailsEditable".
Thats it. The Boolean variable "PriceDetailsEditable" is kept up to date by the calls to the UpdatePriceDetailsEditable function, and this maintains the editable property of the price fields.
I don't think there are any shortcuts in doing this. You cant create a function, and call this function in the editable property. It needs a Boolean variable, which has been included in the dataset (the IncludeInDataset bit is kind of important).
When opening a page using the properties of an "Action", you can define the RunFormMode. This can be either View, Edit or Create. This use of these should be obvious, and they change the functionality of the form/page opened quite considerably.
- Downsizing Dangers - 28th October 2013
- Dynamics NAV NAS/Job Queue - Excel SaveAs method failed - 18th October 2013
- New in XLCubed 7.5 - 16th October 2013
- How to suspend and resume SQL database mirroring - 15th October 2013
- XLCubed: Excel Dashboards - 11th October 2013
- Analytical Applications of Business Intelligence Reporting - 10th October 2013
- What is Microcharts? How can it clarify data? - 10th October 2013
- Can’t print from XLCubed Web Edition - 2nd October 2013
- A call to SSPI failed in NAV 2009 R2 - 31st May 2011
- Can’t send BizTalk documents from NAV2009 Role Tailored Client - 23rd May 2011
- Unique External Document No. on Sales Order - 23rd May 2011
- CRM 2011 – NAV 2009 R2 Synchronisation – tips and tricks - 10th May 2011
- Manually Create NAV Service Instances - 3rd May 2011
- SQL Maintenance plan won't run, modify or delete - 24th November 2010
- Miscellaneous NAV RTC Development Tips - 21st November 2010
- NAV RTC Development training tools - 18th November 2010
- Microsoft Dynamics NAV Application Objects - 15th November 2010
- Delete a rogue Conur Expense Report - 12th November 2010
- CRM - 9th November 2010
- application objects
- Business Intelligence
- cached password
- Commerce Gateway
- CRM 2011
- CRM 2013
- Crystal Reports
- Data Type
- date and time
- Dynamics NAV
- Excel Buffer
- External Document No.
- Generate xsd from SQL table
- Job Queue
- Microsoft Excel
- NAV 2009
- NAV 2009 R2
- NAV Application Server
- NAV Development
- NAV Upgrade
- new version
- no delimiter
- service broker
- User Setup
- Web Service