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
Piotr Wycichowski
Hi, I need very quick support. We've just upgaraded our SERP from version 250507/85558691 to 260126/85561335 (on Mac server). When server process was started, the folder EmailGateway was autom...
08:56 10 Mar 2026
Hi Bror-Erik, Thanks for your reply. We've done further testing and we've discovered that it is only my Windows 11 laptop that has this message about downloading components. Other coll...
12:04 27 Feb 2026