Extending the app¶
Contract Management 365 publishes integration events in the objects below. Subscribe to them from your own extension instead of changing the app. The parameter lists are in the app's symbols.
| Object | Area | Events (examples) |
|---|---|---|
| Codeunit 6102685 CUR Implement Contract Accept | Implementing a contract acceptance | OnBeforeImplementContractAccept, OnBeforeCheckMandatoryFields, OnAfterImplementSalesDoc (23 events) |
| Codeunit 6102677 CURContrAcceptToContract | Creating the contract from the acceptance | OnBeforeOnRun, OnAfterOnRun, OnBeforeAcceptLinesCreateContractLines |
| Codeunit 6102691 CUR Check Contract transfer | Moving draft → acceptance → contract | OnBeforetransferContractAcceptToContract, OnAfterCheckContractAcceptanceLine (6 events) |
| Codeunit 6102678 CURInvoicePrePaidContracts | Invoicing prepaid contracts | OnBeforeCreateInvoicingPeriod, OnAfterCreateSalesInvoice, OnAfterCreateSalesInvoiceLines (9 events) |
| Codeunit 6102680 CURInvoiceBackwardContracts | Invoicing in arrears | OnBeforeCreateInvoicingPeriod, OnAfterCreateSalesInvoice, OnBeforeCreateContractConsumption (8 events) |
| Codeunit 6102687 CUR CreateContOneTimeInvoice | One-time invoices | OnBeforeCreateOneTimeInvoicingSalesHeader, OnBeforeCreateOneTimeInvoicingSalesLine (7 events) |
| Codeunit 6102681 CUR CreateContractInvoice | Sales invoice lines | OnBeforeSalesHeaderInsert, OnBeforeSalesLineInsert (6 events) |
| Codeunit 6102673 CUR ContractHandler | Entries and invoicing periods | OnBeforeInsertContractEntry, OnAssignInvoicingPeriods (5 events) |
| Codeunit 6102682, 6102683, 6102684 | Prices on contract and acceptance lines | OnBeforeSetPrice, OnAfterSetPrice, OnAfterAddSources |
| Codeunit 6102700 CUR Contract Templ Mgt. | Contract templates | OnBeforeApplyTemplate, OnAfterApplycontractTemplate (21 events) |
| Codeunit 6102692 CUR Trailing Contracts Mgmt | Trailing contracts | OnBeforeGetContractAmount (3 events) |
| Codeunit 6102701 Contract Header - Edit | Editing a contract | OnRunOnAfterContractHeaderEdit (4 events) |
| Table 6102676 / 6102677 CUR Contract Layout Header / Line | Draft and acceptance fields, prices and dimensions | 26 and 32 events |
| Table 6102679 / 6102680 CUR Contract Header / Line | Contract fields, prices and dimensions | 3 and 20 events |
Add a digital signing provider¶
Digital signing works through the interface CUR Signing Provider. Penneo is the first implementation. Another app can add a provider without changing Contract Management 365:
- Extend enum 6102685 CUR Signing Provider (it is
Extensible) with a value whoseImplementationis your codeunit. - Implement the interface in that codeunit:
| Procedure | What it must do |
|---|---|
SendCase(var SigningCase; var SigningDocument temporary; var SigningSigner temporary): Text |
Create and send one case with the documents and the signers in signing order. Return the provider's id of the case. Do not write to the database: the case record is inserted after the call. |
UpdateStatus(var SigningCase) |
Read the status from the provider and set Status and Status Message. No Modify, no Commit. |
GetSignedDocuments(SigningCase; var SigningDocument temporary) |
Return the signed documents of a signed case (and a proof, if the provider has one). |
CancelCase(SigningCase) |
Cancel a sent case. Raise an error when the provider cannot. |
TestConnection(): Boolean |
Test the connection with the stored credentials. |
SupportsMethod(Method): Boolean |
Return whether the provider can require the signing method (enum 6102687: Simple, MitID, MitID Business). Never downgrade a method silently. |
OpenSetup() |
Open your provider's own setup page. |
The records are CUR Signing Case (table 6102691, the persisted case), CUR Signing Document
(6102692, temporary; Kind is Document, Signed or Proof) and CUR Signing Signer (6102693,
temporary). Statuses are enum 6102686 CUR Signing Status: Sent, Signed, Rejected, Expired,
Withdrawn.
Contract Management 365 calls the provider before it writes to the database in the same transaction,
reads statuses in a job queue (codeunit 6102708) with one Codeunit.Run per case, and handles the
locking of the acceptance itself. A released interface is not changed; new capabilities come as a new
interface that a provider can also implement.
IsHandled¶
Events marked IsHandled let you replace the standard behavior. Use them with care: when you set
IsHandled to true, the app skips its own code for that step.