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.
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"?
Describe the request
Previous request: https://github.com/microsoft/ALAppExtensions/issues/26061
For context please see this previous ticket -> https://github.com/microsoft/ALAppExtensions/issues/25795
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