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
Bror-Erik Kotiranta
I will have a programmer answer this one, I do not have the full answer for this...
14:23 25 Jan 2025
Bror-Erik Kotiranta
I meant that file you were looking it, forgot the actual name sorry about that. But that file, if you change the IP to the correct one, does it then connect?...
14:21 25 Jan 2025