microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
779 stars 613 forks source link

No acces to necessary OnPrem Functionality "GetEmailBodyTextForCust" #26061

Closed Kenozakesy closed 6 months ago

Kenozakesy commented 7 months ago

Describe the request

For context please see this previous ticket -> https://github.com/microsoft/ALAppExtensions/issues/25795

[Scope('OnPrem')]
procedure GetEmailBodyTextForCust(var ServerEmailBodyFilePath: Text[250]; ReportUsage: Enum "Report Selection Usage"; RecordVariant: Variant; CustNo: Code[20]; var CustEmailAddress: Text[250]; EmailBodyText: Text) Result: Boolean

This procedure on the "report selection" (77) table needs to have it's attribute onprem removed so that it can be called by us. Then we can easily replace the existing "ServerEmailBodyFilePath" With another one we require. without a very conveluted solution.

Additional context

As seen in the ticket https://github.com/microsoft/ALAppExtensions/issues/25795

local procedure OnSendEmailDirectlyOnBeforeSendFileLoop(ReportUsage: Enum "Report Selection Usage"; RecordVariant: Variant; DocNo: Code[20]; DocName: Text[150]; var DefaultEmailAddress: Text[250]; ShowDialog: Boolean; var TempAttachReportSelections: Record "Report Selections" temporary; var CustomReportSelection: Record "Custom Report Selection"; var IsHandled: Boolean; var ServerEmailBodyFilePath: Text[250])

Now this function has the variable "on email body filepath". This allows us to change the input of the body per email as we see fit which is very helpfull.

Problem being the way this filepath is normally obtained is by using the method. and then further down the file is used when sending the email.

table 77 report selection, line 1378 FoundBody := GetEmailBodyTextForCust(ServerEmailBodyFilePath, ReportUsage, RecordVariant, CustNo, EmailAddress, EmailBodyText); This method has the attribute OnPrem meaning we can not use it for custom implementation in our SAAS environment. Maybe there is a solid reason for this, but we currently cannot see why this would be the case.

If this cannot be changed then could you please offer a different solution to this problem? How should we obtain our "ServerEmailBodyFilePath"?

Internal work item: AB#504529

Kenozakesy commented 7 months ago

I still do not have an reaction on my issue. I'd like to know whether or not this problem could be solved. Thank you.

BardurKnudsen commented 6 months ago

This is a security concern. We don't want to expose our file structure on SaaS, hence the [OnPrem] mark.