-
Notifications
You must be signed in to change notification settings - Fork 686
Description
Why do you need this change?
We currently have an AppSource app that allows tracking of different legal entities in a single Business Central company using Dimension Values to distinguish between the legal entities. For many of our US clients, each legal entity may correspond to a different tax group and therefore require separate tax generation and submission of the IRS 1099 reports based on the dimension values. We already fully integrate with the 1099 functionality in the Business Central US base app, however with the introduction of the new IRS 1099 module we require a few additional integration events in this new module to allow our solution to continue to function in this area for our customers.
We require 4 integration events as follows:
- report 10034 "Create Transmission IRIS" inside trigger OnPostReport()
This will be used to set an additional range against the validation which currently only allows one transmission per IRS Reporting Period. We would add an additional range here based on our dimension values as there may be up to one transmission per IRS Reporting Period and Dimension Value. - codeunit 10056 "Process Transmission IRIS" - procedure AddReleasedFormDocsToTransmission()
This will be used to filter the documents included in the transmission that is created. We will filter the documents based on the Dimension Value assigned to each document against the dimension value of the transmission as only records belonging to appropriate Dimension Value should be included in the transmission for that Dimension Value. - Inside codeunit 10033 "Generate Xml File IRIS"
a. local procedure AddIssuerDetails() - This will be used to update the Company Address Information in the transmission XML to be accurate for the Dimension Value submitting the tax report, as the Company Address Information is stored by dimension value with our solution.
b. local procedure AddContactPersonInformationGrp() - Same as point 3a, this will be used to update the Company Address Information in another place where it is used (i.e. contact person).
Describe the request
-
report 10034 "Create Transmission IRIS" inside trigger OnPostReport()
trigger OnPostReport()
var ....
begin
....
....
Transmission.SetRange("Period No.", PeriodNo);
OnBeforeTransmissionFindFirst(Transmission);
....
....
end;[IntegrationEvent(false, false)]
procedure OnBeforeTransmissionFindFirst(var Transmission: Record "Transmission IRIS")
begin
end; -
codeunit 10056 "Process Transmission IRIS" -
procedure AddReleasedFormDocsToTransmission(var Transmission: Record "Transmission IRIS") DocsCount: Integer
var
IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header";
begin
IRS1099FormDocHeader.SetRange(Status, IRS1099FormDocHeader.Status::Released);
IRS1099FormDocHeader.SetRange("Period No.", Transmission."Period No.");
OnBeforeIRS1099FormDocHeaderFindSet(IRS1099FormDocHeader,Transmission);
....
....
end;[IntegrationEvent(false, false)]
procedure OnBeforeIRS1099FormDocHeaderFindSet(var IRS1099FormDocHeader: Record "IRS 1099 Form Doc. Header" ;
Transmission: Record "Transmission IRIS")
begin
end; -
Inside codeunit 10033 "Generate Xml File IRIS" but as It is marked internal so have to create new codeunit to add new events and use it inside this codeunit.
a) local procedure AddIssuerDetails()
var
....
"Generate Xml File IRIS Events" : Codeunit "Generate Xml File IRIS Events";
begin
....
CompanyInformation.Get();
IRSFormsSetup.Get();
"Generate Xml File IRIS Events".OnAfterGetCompanyInfoAndIRSFormSetup(CompanyInformation,IRSFormsSetup);
.....
.....
end
b)local procedure AddContactPersonInformationGrp()
var
....
"Generate Xml File IRIS Events":Codeunit "Generate Xml File IRIS Events";
begin
....
CompanyInformation.Get();
"Generate Xml File IRIS Events".OnAfterGetCompanyInformationSetup(CompanyInformation);
.....
end;
Codeunit XXXX "Generate Xml File IRIS Events"
{
procedure OnAfterGetCompanyInfoAndIRSFormSetup(var CompanyInformation: Record "Company Information";
var IRSFormsSetup: Record "IRS Forms Setup";)
begin
OnGetCompanyInfoAndIRSFormSetup(CompanyInformation,IRSFormsSetup);
end;
procedure OnAfterGetCompanyInformationSetup(var CompanyInformation: Record "Company Information")
begin
OnGetCompanyInformationSetup(CompanyInformation);
end;
[IntegrationEvent(false, false)]
procedure OnGetCompanyInfoAndIRSFormSetup(var CompanyInformation: Record "Company Information";
var IRSFormsSetup: Record "IRS Forms Setup";)
begin
end;
[IntegrationEvent(false, false)]
procedure OnGetCompanyInformationSetup(var CompanyInformation: Record "Company Information")
begin
end;
}
Internal work item: AB#614181