Sunday, July 15, 2018

Write code for Event Handler

The wizards run in the previous demonstrations create event handler classes that
need to be completed. This can include basic steps to set the status of the
approval, or include more complex business logic. The following code needs to
be added to the
completed method of the SalesCreditLimitApprEventHandlerclass.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
public void completed(WorkflowEventArgs _workflowEventArgs)
{
  SalesTable SalesTable;
  select forupdate SalesTable where 
  SalesTable.RecId ==
 _workflowEventArgs.parmWorkflowContext().parmRecId();
  if(SalesTable.RecId)
  {
    SalesTable.CreditLimitApprovalStatus =SalesCreditLimitApprovalStatus::Approved;
    SalesTable.write();
  }
}

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...