Fxiaoke Developer Manual Fxiaoke Developer Manual
  • APL Development Manual
  • PWC Development Manual
  • OpenAPI Documentation
APL Code Introduction
API Reference
Development Tools
Release Notes
  • 简体中文
  • English
APL Code Introduction
API Reference
Development Tools
Release Notes
  • 简体中文
  • English
  • Getting Started

  • APL Function Open Scenarios

  • APL Class Open Scenarios

    • Common Library

    • Electronic Signature

    • Authentication Provider

    • Available Business Types

    • Object Controller Plugin

    • Event Listener

    • Object Export Plugin

      • 1.Overview
      • 2.Configuration Steps
      • 3.Groovy Code Examples
      • 4.FAQ
    • ERP Integration Platform

    • Field Service Type Function Validation

    • FMCG Order Business Plugin

    • Object Business Handler

    • Online Documentation

    • Custom Model

    • Environment Deployment

Groovy Code Example

/**
 * @type classes
 * @returntype
 * @namespace object_export_plugin
 */
class ObjExpJ552Z implements ObjectExportPlugin {

    /**
     * Process data to be exported during export operation
     * May execute multiple times depending on the amount of data being exported
     * @param context
     * @param arg
     * @return
     */
    ObjectExport.DoExportResult doExport(FunctionContext context, ObjectExport.DoExportArg arg) {
        def markStr = "******"
        log.info(context)
        log.info(arg)

        def objectApiName = arg.getObjectApiName()
        log.info(objectApiName)
        def markField = ""
        if ("object_l9WB3__c" == objectApiName) {
            markField = "field_zty92__c"
        }

        if ("object_o6sBx__c" == objectApiName) {
            markField = "field_GD6z1__c"
        }

        if ("object_w064j__c" == objectApiName) {
            markField = "field_x09r3__c"
        }
        // Original data
        def originalDataList = arg.originalDataList
        // Data for display
        def displayDataList = arg.displayDataList

        // Mask sensitive data
        displayDataList.each {
            it[markField] = markStr
        }

        return ObjectExport.DoExportResult.builder()
                // Return processed display data
                .displayDataList(displayDataList)
                .build()
    }

    /**
     * Called once after export completes
     * @param context
     * @param arg
     * @return
     */
    ObjectExport.AfterResult after(FunctionContext context, ObjectExport.AfterArg arg) {
        // Exported object
        def objectApiName = arg.getObjectApiName()
        // Total exported records count
        def totalCount = arg.getTotalCount()
        log.info(context.tenantId)
        return null;
    }
}
2.Configuration Steps
4.FAQ

← 2.Configuration Steps 4.FAQ→

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式