Error Handling

During data synchronizing, a SyncErrorHandle logic intercepts any failures, captures the error details, and updates the corresponding record with that information.

Ensure module includes these field :

  • Error field (Boolean)

  • Error Message field (Text)

Error Handling Sample Code

To find {fieldName}, you are required to have access to Alpha or use Network in Developer Tools [F12].

moduleName = "{YOUR_MODULE_NAME}"
if inputs is not None and inputs['document'] is not None and inputs['document']['payload'] is not None:
    doc = Module(moduleName).find({ 'Dynamic.Extension.{fieldName}': inputs['document']['payload']['docNo'] })
    if doc is not None:
        form = Module(moduleName).execute('sync', doc)
        form['Error'] = True
        form['Error Message'] = inputs['error']
        debug("result",form)
        Module(moduleName).submit(doc, form)

Last updated