Fetch recent approval | Zoho Creator Help

Fetch recent approval

This service lets you fetch Approval tasks in your Zoho Creator applications and execute approval actions.

Fetch recent approval List

Methods
static func fetchRecentApprovalList(for approvalAPIInfo:ApprovalAPIInfo, completionHandler: @escaping (Result) -> Void)

Parameters

ApprovalAPIInfoA struct that has the information on Creator app and approval type.
completionHandler

Approval data will be returned in completion Handler.

Example

let approvalAPIInfo = ApprovalAPIInfo.init(appOwner: "<appOwner>", appLinkName: "<appLinkName>", listType: ApprovalAPIInfo.ApprovalListType.pending)

ZCApprovalAPIService.fetchRecentApprovalList(for: approvalAPIInfo) { (result) in

switch result

{
case .success(let approval):
print(approval.tasks)
case .failure(let error):
 print(error)
 }
 }


  1. Fetch approval list
  2. Fetch approval summary
  3. Execute approval action