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
Reino Botha
Please check your version of android if it is the same as the server you are connecting too. ...
08:24 21 Nov 2024
Bror-Erik Kotiranta
In NC you hace operations>>ai chats. They are used for these Br, Bror-Erik...
05:12 21 Nov 2024