Skip to main content

Posts

Conditional Colouring in NAV 2013 Pages

Hi all, As we were facing problem in Role Tailored client till NAV 2009 R2 about the colors. Customer wanted conditional coloring of rows based on some condition but was not possible in Role Tailored Client. With NAV 2013 Microsoft have come up with a level of Conditional coloring  yeah still have some limitations. The number of colors that are supported are fixed. Let's see how is it there - I was just checking pages in NAV 2013 and seen this. If you remember a property of Field in Page i.e StyleExpr which used to have value True or False is now have been changed and can take variables as value. Just have a look in Page Customer Ledger Entries, Field - "Document No." . Below is the property for the field. So the property have value StyleTxt which sets onAftergetrecord() and get value from function setstyle as shown below. Then i navigate to Table 21 Cust. Ledger Entry for the function definition and below is the code written in the function

Error 47-1 During Export Objects as Text

Hi all, Sometime we face an error message while exporting objects as Text file, but when we try to export as .fob it works fine. Today i require to compare some object so i needed them in text file, when i tried to export as text i get below listed error. There are errors in the text conversation (text no. 165-205 does not exist in the .stx file). Internal error: 47-1 Reason of Error - The reason of the error is due to objects version conflict. The objects which i was trying to export as text file are of higher version and were in the older version of database. In my case the objects were from NAV 2009 SP1 and were in NAV 5 SP1. Resolution of Error - 1) Export the objects into .fob format. 2) Create a new temporary database in new version. 3) Import the exported objects into new created database. 4) export objects into text file. Regards, Saurav Dhyani http://saurav-nav.blogspot.com/

Run XMLPORT in Navision Before NAV 2013

Hi all, For Running a XML PORT in Navision Before NAV 2013, we can do that via a codeunit. Below is the sample of execution of Xml Port via a codeunit. Variables in Codeunit Name                                 DataType _Filev                                 File _DatafileOutstream                 OutStream Selection                                 Integer _DatafileInstream                 InStream

Hyper Link to a Page from a Report.

Hi all, As we see in last post how to expand-collapse in Navision RTC report . In the same report we will now try to add Hyperlink to the item Number. So that on clicking on the item number in the report, the item card will get open in edit mode. Let's see how to do it. Taking Report 1001 (Inventory Valuation) Report for Demo. 1) Open Microsoft Dynamics NAV Developer Environment. 2) Design Report 1001. 3) In C/AL Global add a new variable.      a) Name - ItemRecRef, Datatype - RecordRef. 4) Now i will add code in the data item to get item. 5) Goto Pre-data of Item and write following line of code.       a) ItemRecRef.OPEN(27); 6) Goto OnAfterGetRecord of Value Entry add following line of code.       a) ItemRecRef.SETPOSITION(Item.GETPOSITION); 7) Add a column in Report Desing for Item Table.       a) DataSource - FORMAT(ItemRecRef.RECORDID,0,10), Name - Item_Rec_Ref_Val 8) Now open the Report Layout in Visual Studio. 9) Goto TextBox Properties of =F