Mass Contract Services Changes Before Activation
Mass changes to some services Before Contract Activation is done via the Contract Services Change before Activation function, which can be found in the viewfinder or from the relevant Role Center via the Changing menu.
Notification:
Changes will always be made to the original contract. The task cannot display the contracts it will change in advance, it works directly on top of the originals, and there is no undo.
Before going live, they recommend testing the task on a current test environment, for example.
The affected contracts will be included in the Contract Change Log with the result of Success or Fail (including a description of the error), or in the Contract Change History for individual contracts.
Due to the complexity of the process of making the change, it is recommended only for tested users.
Once confirmed, the Contract Services Change before Activation dialog box (API Serv. Changes Bef. Activ. (4026639, Report Req..) To specify the performed task or contracts:
In the Options section, there will be fields:
Change Type
The user selects what he wants to do
Option (ENUM) = Add, Delete, Reprice (CZ: Přidat, Odstranit, Přecenit)
Service Kind
Option (ENUM)=Maintenance, Tire service, Replacement Car, Insurance , Road Tax (for CZ and SK only), Highway Ticket, Fee/Service, Fuel Card CZ: Maintenance, Tire service, Replacement vehicle, Insurance event, Road tax (for CZ and SK only), Highway vignette, Fee/Service, Fuel card
The user will only be able to select Road Tax (CZ/SK), Highway Ticket or Fee/Service
When the value changes, the system automatically deletes the Service Type Code and Service Code.
If you select a different service type, the system will display an error message and will not allow you to continue - just like in the current task:
Service Type Code
Empty by default
Non-editable for Service Kind=Road Tax (note: for this Service Kind, the Service Type Code is taken from the Contract with Services Setup)
Lookup do API Service Type (4026705)/API Service Types (4026705, List) with filter to Service Kind
When the value changes, the system automatically deletes the Service Code.
Service Code
Empty by default.
If Service Kind=Highway Ticket:
Lookup to API Highway Ticket Pricelist (4026653)/API Highway Ticket Pricelist (4026653, List) with filter to Service Code, resp. Valid From<=workday<=Valid To (can also be empty)
If Service Kind=Fee/Service:
Lookup to API Fee and Service Pricelist (4026651)/API Fee and Service Pricelist (4026651, List), with filter to Service Code, resp. Valid From<=workday<=Valid To (can also be empty)
for others, Service Kind is empty and uneditable
Keep Correction
By default, N, toggles use. to Y if the correction is to be maintained
editable only for Change Type=Reprice
Switching Change Type to a different value disables Keep Correction editability and sets the value to N.
Contract Change Type
The user selects the contract change type code, which will then be written to the Contract Change History (Change Code field)
mandatory, see Checks after running the job
lookup to API Contract Change Type (4046856)/API Contract Change Types (4046856, List) with filter:
Object ID wizard (15)=empty (i.e. we do not allow to select a change that is triggered by the wizard)
Contract Change Reason
the user selects the reason code for the contract change, which will then be written to the Contract Change History (Reason Code field)
lookup do API Contract Change Reason (4046857)/API Contract Change Reasons (4046857, List)
Comment
Empty by default
the user adds a text note, which is then written by the task into the Contract Change History (Comment field).
In the Filter: Financing Contract Header section, there will be the following filters:
User filters will all be empty by default (same as in the Contract Services Change task)
Financing Product Type Code
Financing Product No.
Customer No.
No. (Contract No.)
Migrated Contract
additional filters can be added by the user via the + button (e.g. Fin.Template No., Status, Detailed Contract Status, etc.). If the user wants to filter to Status, he must also take into account the fixed filter for Status.
Sorting, Searching, and Filtering Lists - Business Central | Microsoft Learn
The fixed filter will be (in contrast to the Contract Services Change task):
Status<Active
Financing with Services=Y
After starting the task by clicking the OK or Schedule... The system will perform:
To check if the Contract Change Type is filled in for all Change Type:
If it is not filled in, it displays an error message and does not continue:
Contract Change Type must be entered. EN: Contract change type must be entered.
Note: The Contract Change Code is mandatory for creating a change copy
checking whether the fields in the Option section are filled in.
If Service Type Code and/or Service Code is empty, it displays an error message and does not continue - this is true for all Change Type in this task:
If they are filled in, it continues
Filters contracts according to user filters in the Option section (if they are empty, it is not filtered) and to the Status<Active fixed filter
On the found contract, it then continues according to the Change Type:
Add:
checks if there is a Service in the contract with the same Service Kind, Service Type Code and Service Code (for Road Tax only Service Kind):
if it exists, it will write to the Contract Change Log with the result Fail, Error Detail=Add: Service ... Service Code... already exists." EN: "Add: Services ... Service Code.. already exists." and proceeds to the next contract.
If such a Service does not exist, it executes:
Update the Reference Date (4047010) field in the Financing Contract Header API Financing Contract Header (4026397)
creates a new service as specified in the request page in Contract Services without any link to the product/contract template:
Service Kind = z request page
Service Type Code = z request page (for Road Tax z Contract with Services Setup)
Service Code = from the request page (for Road Tax it can be found in the price list)
Service Status=Preparation
Valid From = Expected Handover Date of the contract (note: by default, the service is based on the contract before activation)
Valid To = Valid To after Extension = Expected Contract Termination Date
Create a service detail for the service:
From the relevant price list, it will take over the data that is also taken over when creating a service detail (Highway Ticket and Fee/Service) in the standard way. For Road Tax, the Service Code can be found in the Road Tax Pricelist.
then it adopts the rates valid as of the Reference Date of the contract as in the case of standard detail creation).
Updates the values from the detail to Contract Services.
Notification: The creation of a new service will be performed without any link to the services of the product/template contract. I.e. without setting flags, e.g. Reinvoice, Charge, default correction, etc. Otherwise, the user would have to first create the appropriate service into the product and contract template.
Delete:
If it does not find the service specified in the request page (Service Kind, Service Type Code, Service Code, or for Service Kind only Service Kind), it makes an entry into the API Fin. Contract Change Log (4046845) with the result Fail, Error Detail=Delete: Service ... Service Code... doesn't exist.." EN: "Delete: Service ... Service Code... doesn't exist." and goes on to the next contract,
If the Service exists, it performs the service deletion - function on the Delete button (API Contract Services (4026681 tab)):
deletes the record in API Contract Service (4026681)
if more than one Service Kind=Road Tax service is found, it will delete all of these services (if the Service is created according to discount bands, there may be more related services).
deletes the service detail
deletes service lines (payable cal. services)
when you delete a service, you won't be asked like when you delete it manually: "Go ahead and delete?"
Continues to the next contract.
Reprice:
If it does not find the service specified in the request page (Service Kind, Service Type Code, Service Code) or if it has Reinvoice=Y, it makes an entry into the API Fin. Contract Change Log (4046845) with the result Fail, Error Detail=Reprice: Service ... Service Code... doesn't exist.." EN: "Reprice: Service ... Service Code... doesn't exist." and goes on to the next contract,
If the contract has a service as specified in the request page with Reinvoice=N, the system executes:
update the Reference Date (4047010) field in the contract header API Financing Contract Header (4026397) = system work date
Pak aktualizáciu detailu služby:
Service Kind=Highway Ticket:
according to Service Code, valid values (Valid From<=Reference Date from the contract header<=Valid To can also be empty) are taken from the API Highway Ticket Rate (4047004)
Value Excl.VAT (LCY) in detail = Fee Amount Excl.VAT (LCY)
Purchase Price Excl.VAT (LCY) in detail = Purchase Price Excl.VAT (LCY)
Note: if it finds a zero value in the rates, it will fill that value as well. They recommend that you check the applicable rates before running the job.
revalidates the Correction field (+-%), which calculates the amount fields. If the Keep Correcion value was:
N - deletes the existing correction (sets the value to 0)
Y - Retains the existing correction.
Service Kind=Fee/Service:
according to Service Code, valid values (Valid From<=Reference Date from the contract header<=Valid It can also be empty) are taken from the API Fee and Service Rate (4047002)
Fee Amount Excl.VAT (LCY) in detail = Fee Amount Excl.VAT (LCY)
Purchase Price Excl.VAT (LCY) in detail = Purchase Price Excl.VAT (LCY)
Note: if it finds a zero value in the rates, it will fill that value as well. They recommend that you check the applicable rates before running the job.
On the service detail, it validates the fields Purchase Price Excl.VAT (LCY) and Correction (+-), which calculates the fields with amounts. If the Keep Correcion value was:
N - deletes the existing correction (sets the value to 0)
Y - Retains the existing correction.
Service Kind=Road Tax:
Service will be deleted, including its details or the lines of the payment calendar
create a new service, including its details
Updates the service values in the Contract Service API:
Calculation Amount Total
Calculation Amount Per Payment
Purchase Price Total
Margin Total
Then it proceeds to recalculate the contract according to the contract flag - applies to all Change Type:
If Complete Calculation (4047060)=N:
the recalculation is performed by formulas, i.e. the Payment Calculation function is called
If Complete Calculation (4047060)=Y:
Recalculates the service payment calendar and deploys it to the contract payment calendar (even if a down payment is posted).
Creates a record in the API Contract Change History (4046858) without creating a change copy, but adds some values to the record from the request page:
Contract Change Process = Change Copy (must be filled in, cannot remain empty)
Change Type Code = Contract Change Type z request form
Approved By = ID of the user who runs the task
Approval Date = System Work Date
Change Reason Code = Contract Change Reason z request form
Change Valid From = system work date
Change Date = Expected Handover Date
Comment = Comment from request form
Closed(15)=Y
Creates an entry in the Contract Change Log with the result Result=Success.
Continues to the next contract.
If the task was started manually by the OK:
while the contract is being processed, it will display the message Working on it... Contract ....
after completion, it will display the message "The change has been made in X contract(s). There was an error in the Y contract(s)."
If the job was run over the Schedule..., these messages will be suppressed.