[NAV 2017]
Question:
I know it is not possible to custom the primary key in the standard table and include that table in the extension.
But is there a work around?
What I am trying to do:
The context is - basically when Item is same on multiple sales or purchase lines, the GL entries roll up and show one line as total, I want to separate those lines and show descriptions from document itself. I hope this make sense.
To do that I need to customise table 49 and add description field and then add it to primary key of the table and this is where the issue of extension limitation hits.
Any ideas will be appreciated!!
Ciao!
United Kingdom
0
Answers
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
For my current installation, I'm using the field "Line No." of the Sales Line-Table to show the Description per Sales Line in the G/L Entry-table. Maybe it is possible to use the same Field and the field "Fixed Asset Line No." of Table 49 in your solution.
Uppercase, remove spaces and hash the description, and take the first 20 characters of the hash. I'm pretty sure you won't see duplicates
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
I wouldn't recommend that. Hashes aren't collission free, so different data can result in the same hash. Cutting the hash will increase that probability.
Counting the unique descriptions and filling one of the unused key fields of table 49 with the corresponding integer value might do the job.
I woudn't be much worried much about collisions...
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Keep it simple.
just create a Dimension that maps one:one with the Item no. Then add this to the sales line. This will create a unique Dimension Set ID which will then group by dimension and thus do your grouping by Item automatically.