Friday, April 14, 2023

D365 F&O - Add custom signing limit document type into the singing limit policies.

 

As part of standard, below are the document types available in singing limit polices. To add the custom document type please follow the below steps.

 

Usage of singing limits:

It will be used in hierarchy level workflows to approve the document based on signing limit amount.

Scenario: We are going to add custom document type ‘sales return’. We can use this custom document type in singing limit polices and workflow editor.

1)      Extend the base enum ‘HrpLimitDocumentType’ and ‘SourceDocumentRelationType’ and add your custom document type, here its is ‘sales return’.

2)      Create the post COC for init() method for the below forms

·       SysPolicyListPage

·       WorkflowTableListPageRnr

Ex: Extension of the form ‘SysPolicyListPage’

[ExtensionOf(formstr(SysPolicyListPage))]

final class KMGSysPolicyListPageForm_Extension

{

    /// <summary>

    /// Insert the sales return document type record if not exists

    /// </summary>

    public void init()

    {

next init();

HRPLimitDocument::insertIfNotExists(HrpLimitDocumentType::KMGSalesReturn, SourceDocumentRelationType:: KMGSalesReturn);

    }.

Write the COC like above for WorkflowTableListPageRnr form as well.

No comments:

Post a Comment

Post-PROD DB Restoration Steps

Hi Everyone,  While many resources explain the process of performing a point-in-time restore from Production to Sandbox in Dynamics 365 FO, ...