Saturday, July 14, 2018

Enable Workflow on the Form

Workflow on the form is enabled using properties on the design node, and by
overriding a form method. Perform the following steps to enable workflow on a
form.


1. Open the
AOT.

2. Expand
Tables > SalesTable.

3. Create a new method and add the method in the following code.


4. Save the changes made to the table.


5. Expand
Forms > SalesTableListPage > Designs.

6. Right-click on the
design node and select Properties.

7. Change the
WorkflowEnabled property to Yes.

8. Change the WorkflowDatasource property to SalesTable.

9. Change the
WorkflowType property to SalesCreditLimitAppr

10. Save your changes to the form.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
boolean canSubmitToWorkflow(str _workflowType = '')
{
amountMST creditBalance;
custTable custTable;
;
if (!this.CreditLimitApprovalStatus ==
SalesCreditLimitApprovalStatus::NotSubmitted)
return false;
custTable = this.custTable_InvoiceAccount();
if (!custTable.CreditMax)
return false;
creditBalance = custTable.CreditMax -
custTable.balanceMST();
if (this.amountRemainSalesFinancial() +
this.amountRemainSalesPhysical() < creditBalance)
return false;
return true;
}

Best Regards,
Hossein Karimi

No comments:

Post a Comment

Configure the Firewall on the Enterprise Portal Server

After you install Enterprise Portal, enable Web Server (HTTP) in Windows Firewall. If you do not enable the web server in Windows Firewall...