Skip to content

[E-Document Core] - Sending E-document file via service and an email in parallel. Create E-document from Posted Sales Invoice #28099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 69 commits into
base: main
Choose a base branch
from

Conversation

GMatuleviciute
Copy link

@GMatuleviciute GMatuleviciute commented Feb 11, 2025

This pull request does not have a related issue as it's part of the delivery for development agreed directly with @altotovi @Groenbech96

Implementation 1

With this update E-Documents are automatically created and emailed, when posting Sales Invoices, Sales Orders, and Sales Credit Memos.

When the user clicks on "Post" ->"Post and Send" action:

  1. Sales document is posted.
  2. At the same time E-Document is created.
  3. Newly created E-Document is sent via email automatically.
  • E-Document is added as a new type of a file to attach under "Sending Options" FastTab on Document Sending Profile page.
  • The "Post and Send" option simplifies the process by automatically generating and emailing e-documents. A user can complete both actions in one step.

This feature improves efficiency by reducing manual tasks and ensuring timely e-document distribution.

Implementation 2

Another newly implemented E-Documents feature enables users to generate an E-Document from a posted Sales Invoice or Credit Memo, even if the customer’s setup was incomplete at the time of posting.

This enhancement allows users to generate an E-Document from a posted Sales document if the customer configuration regarding "Document Sending Profile" has been updated post-posting.

New Action under Related-> E-Document-> Other Menu in Posted Sales Invoice/Credit Memo card page:

  1. Create and send E-Document:
  • Generates an E-Document and sends it via the integrated service.
  • This option is available only if no E-Document is linked to the posted sales document.

Another new Action is added under Print/Send Menu in Posted Sales Invoice/Credit Memo card page:

  1. Create and Email E-Invoice:
  • Generates an E-Document, sends it via the integrated service, and sends it via email to the customer.

In this way, user can get the E-Document through different channels for their convenience.

Related with Base App modification: Replace Temp Server File with TempBlob for Report Email Body by pri-kise · Pull Request #1185 · microsoft/BusinessCentralApps

Fixes #

petemchlk and others added 30 commits December 11, 2024 15:16
BindSubscription(EDocImplState);

// [GIVEN] Sales order
LibraryLowerPermission.SetTeamMember();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the LibraryLowerPermisson here.
A team member migth be able to create sales order currently, but isn't a team member restricted to only create quotes with the license?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest I followed the pattern which is present in E-Doc E2E tests:

image

But its good question, found the same information on team member license

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to be SalesDocsPost permission

local procedure CreateSourceLists(
ToCust: Code[20];
var SourceReference: RecordRef;
SourceTableIDs: List of [Integer];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would reccomend to set var explicit to the reference types here, too.

@petemchlk
Copy link
Contributor

@Groenbech96 @GMatuleviciute this build will fail as it requires the base app modification to be in place

@JesperSchulz JesperSchulz added the Integration GitHub request for Integration area label Feb 26, 2025
@Groenbech96
Copy link
Contributor

PR is still on hold until https://github.com/microsoft/BusinessCentralApps/pull/1185 has been merged.

@GMatuleviciute
Copy link
Author

PR is still on hold until microsoft/BusinessCentralApps#1185 has been merged.

@Groenbech96 Related base app pull request is approved and merged. This pull request is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration GitHub request for Integration area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants