Re: Halcust requirements for Version 8.4
Giuseppe L.
7-16-18
Hello and thank you for reaching out to us with your question.

Below the specifications you asked:

Since version 8.0 there is a new syntax for redefining Register definitions.

Until version 8.0
Previously you would have to Include full register definition, add new fields to record header, new fields to a matrix, add new indexes to the record.

On version update, you had to compare old definition with the new one, put the custom fields in the correct place (end of definition). Then you had to write and import function that would link all the values from the old data structure to the new one.


Version 8.0 and up

New primitives are introduced: RecordAddBegin and EndRecordAdd.
Between these two primitives, you define the new fields/indexes just like you used to do before.
For example:


RecordAddBegin(CUVc,"CUVc_Custom");
RecordField(CustomStr,M4Str,255,0);
RecordField(CustomInt,M4Int,0,0);
ArrayField(CustArrStr,M4Str,255,0);
ArrayField(CustArrInt,M4Int,0,0);

ChangeField(Code,M4Code,30,0);
ChangeField(Name,M4UStr,100,0);

ChangeMatrixField(CustCode,M4Code,30,INVc);

DisableIndex("Name");


KeyBegin(NewKey);
KeySegment(CustomStr);
KeySegment(Code);
SubSetKeyBegin2(CustArrStr);
AppendMatrixFieldToKeyName(CustArrStr,0);
KeySegment(Code);

EndRecordAdd;

Version update:
On next version update, you don't have to do anything. Even if the register has new fields, it will do export/import correctly and link all the fields as necessary. So no need to compare register definitions and no need for import functions anymore.


Important:
- RecordAddBegin has a second parameter - import tag, which is mandatory to have. It works the same way as for RecordBegin primitive.

Restrictions:
- You won't be able to put existing registers' full definitions anymore. This will cause hal compiler error.

Limitations (at the moment):
- Not possible to Segments to existing indexes.
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Latest Posts
David Delač
Hi Piotr, The log entry:
2024-12-14 08:40:43 0.000 CallHal(IsHansaWorldCustomer) appears because the server is running with the verbosity=debug-detailed setting in its parameters.txt file. Thi...
09:43 16 Dec 2024
Brittany McGrath
Hi Vaughn, I can confirm this has been fixed now and is live in Standard ERP 2024-11-20 Version: 85556786. Thank you. ...
10:04 10 Dec 2024