AL icon indicating copy to clipboard operation
AL copied to clipboard

Compiler complains about table "Media Set" and "Media"

Open MaKnauer opened this issue 9 years ago • 3 comments

An error occurs in VS Code, when you define a variable of Record "Media Set" or "Media":

"The type or method 'Media' cannot be used for 'Extension' development." "The type or method 'Media Set' cannot be used for 'Extension' development."

Is there a reason for it?

MaKnauer avatar Nov 27 '17 14:11 MaKnauer

In multi-tenant installations, Media and Media Set tables may contain cross-tenant data, therefore extensions cannot read from them.

Could you please share more details about your scenario? Would you be able to use Tenant Media and Tenant Media Set tables instead?

P.S. You can always change the "target" property in the app.json to "Internal" to get access to Media and Media Set. But please remember that you will not be able to submit such extensions to AppSource, should you have an intention to do so.

defr0std avatar Nov 28 '17 12:11 defr0std

Thanks for the quick answer. Tenant Media Set and Tenant Media works for us.

MaKnauer avatar Nov 28 '17 13:11 MaKnauer

Thanks, closing then.

defr0std avatar Nov 28 '17 13:11 defr0std