CreateRecordLink bug
Paul Timms
9-12-18
I believe I have found a bug in 8.4, relating to CreateRecordLink.

I have a database with multiple companies (over 100). Most of the companies have a code beginning with a letter, except for the companies on the first two rows which have codes 1 and 2, and a company on row 105 which has code 3.

The HAL code loops through all the companies and acts on those with a particular setting switched on. In this test system, only the company on row 3 with code P66 has this switched on. The HAL then creates a custom record and an activity record, and links them together. The line to do this is as follows:

CreateRecordLink(Actr,CurrentCompany,Newr,CurrentCompany);
CreateRecordLink(Newr,CurrentCompany,Actr,CurrentCompany);

When I look at the link manager, I am unable to open the links. The links are prefixed with the short code of the company on row 105. I have done a trace of CurrentCompany at this point in the code, which returns 3. So what it appears to be doing is creating the record link for the company with code 3, not the third company. Since CreateRecordLink can only contain an integer, it is not possible to specify any other identifier of the company.

I also noticed that when logged in to the company on row 3, then once this HAL had run, I clicked on Companies and saw that the company on row 105 was highlighted. This was in client/server mode.

To test this theory, I switched to Admin Client and changed the company code on row 105 to A3. I then ran my code again, and it worked perfectly.
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