Redefinition a main key in VARVc
Vadym
2-7-20
Hello. I try to migrate client from 8.1 to 8.5 and I have a problem.

In 8.1 VARVc was redifinited and in main key added additional index.

But if I try run 8.5 with this datadef hal.log tels me next:
"Error 1:redefinition of register VARVc is not allowed, please use RecordAddBegin()/EndRecordAdd()"

How can I solve this case?

Before

MainKeyBegin(Code,0);
KeySegment(Code);

After
MainKeyBegin(Code,0);
KeySegment(Code);
KeySegment(VARGCode);
Christoffer Riska
2-9-20
Maybe try this:

begin
RecordAddBegin(VARVc,"VARVc_custom");
MainKeyBegin(Code,0);
KeySegment(Code);
KeySegment(VARGCode);
EndRecordAdd;
return;
end;
Vadym
2-10-20
Unfortunately, HAL not support change existing keys in reccordadd block. Only when full redefinition record.
Edgars Dzenis
2-12-20
Hello,
How does Your datadef look in 8.1?

Did You try disabling index(DisableIndex("IndexName");) and add again?
Vadym
2-13-20
Edgars, thanks. DisableIndex is work fine - it's that I need.
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Back to the list
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