AL icon indicating copy to clipboard operation
AL copied to clipboard

Variable.print not available for extension development

Open renebrummel opened this issue 5 years ago • 2 comments

Dear all,

I'm trying to print a report in a PTE SaaS extension. In doing so I run into an annoying issue. Report.Print() works perfectly fine but when I do the same with a declared variable I get an error saying that The type or method 'Print' cannot be used for 'Extension' development. Is this by design?

afbeelding

renebrummel avatar Jul 10 '21 06:07 renebrummel

@thloke any idea why?

kalberes avatar Jul 13 '21 20:07 kalberes

The short (and unhelpful) answer is that these are technically different functions (one being the static Report.Print, the other being the instance ReportVariable.Print), and for some reason they're not consistent in their SaaS availability. I don't see any reason why this should be the case. I'll mark this as a bug with the intention of investigating if there's any reason not to make the instance method available on SaaS.

Ideally we'll just remove the SaaS restriction, but there might have been an old reason for this. Either way, I'll update this issue with our findings.

thloke avatar Jul 13 '21 23:07 thloke