AL icon indicating copy to clipboard operation
AL copied to clipboard

INIT doesn't work when using WITH for a record variable.

Open rishiaurrishabh opened this issue 8 years ago • 4 comments

When I Try to use INIT function on for a record variable using 'WITH' then AL gives an error on as

"message": "The call is ambiguous between the following methods or properties: 'Init()' and 'Init()'"

Code snippet :
with TempEmailItem do begin Init(); end;

rishiaurrishabh avatar Jun 05 '18 12:06 rishiaurrishabh

Hi @rishiaurrishabh ! Could you please attach a minimal set of AL code dthat causes the issue?

atoader avatar Jun 06 '18 06:06 atoader

@rishiaurrishabh It would be nice if you didn't just only use the title of the Issues. This is a very bad style and is not seen well in the github community ^^.

The title of an issue should be short and meaningful. The explanation and details come then in the description. ;)

Gallimathias avatar Jun 06 '18 07:06 Gallimathias

Hi @rishiaurrishabh ! This is by design. You need to qualify the Init procedure with the instance name.

atoader avatar Jun 06 '18 09:06 atoader

Hi @atoader ! for some record variable it works too..not sure if it is changed for AL because on NAV C/AL code it is supported.

rishiaurrishabh avatar Jun 06 '18 09:06 rishiaurrishabh