"The type or method 'AddAttachment' cannot be used for 'Extension' development" even if it is external
Hi ,
I am trying to use SMTP.Addachment function in AL Extension 2.0 but it is throwing an error : "message": "The type or method 'AddAttachment' cannot be used for 'Extension' development.",

when i see it in development environment of my sandbox then it is showing this function as external

strange thing is that it only happens when I create a new package using my sandbox but if I copy and paste a package from NAV 2018 and link it with same sandbox then it works.
When I'm opening my sandbox C/Side Dev Environment I can see that the function "AddAttachment" is internal.
In NAV 2018 the function was external.
When you copy and paste a package from NAV 2018 you are referencing to the wrong symbols, when creating a new package you are using the symbols of the BC sandbox.
Conclusion: Always keep your symbols up2date 😄
@dNsl9r , even after downloading symbols it doesn't show any error on that work space :smiley: . the build of my sandbox has Addattachment function as External. I do understand one thing that the new build has this function as internal but then it should not be conflicting with my extension as I haven't taken that image from docker yet. Though it will make sense when it will show that error on deploying extension at business central but it should not give me this error for my container where I don't have that codebase.

The function is Internal on the latest BC builds so you should not use it anymore:) Whether you see a compiler error or not depends on which exact symbols you have downloaded locally and it looks correct based on your description/screenshots.
Thanks @StanislawStempin ....I got a workaround for it so closing the issue.
Hi, what was the work around for this ?