Triggering the afterSave event via JSON API call?


Leap Version: 9.3.3.0_37
Leap Deployment: Standalone Leap
Operating System: Windows 11


Problem/Query: I have a review process where I load data to a Leap application for end-user interaction. I have built a process to check the loaded data against another data set and pushes any updates via JSON API call. This includes pushing a field value to a single line field that is used in a service on the afterSave event to record the value of that field basically as an audit history. When I manually update a record, this works as intended, but when my process runs to update the records via API, the field value is being updated, but the service itself doesn’t run.

Is there an alternate way to A) trigger this service on every submit button action without having to rebuild that service on each unique submit button and B) only trigger the service when the data submission is successful?

When you use our REST API to create or update form records javaScript events tied to items in the form are not triggered. However, activities tied to a submit action ARE triggered.

The only mechanism to trigger service calls while using the REST API is to configure the service as a submit activity. In addition, you would want to configure the service to execute AFTER the submission, which will only trigger if successful.

@Veronica

An audit trail for an app is an interesting topic.

Several customers have asked for some OOTB capabilities:

There is general capability in Leap to log events to a log file. See Configuration properties - HCL Leap 9.3.9 Help Center however, this doesn’t necessarily help the app’s owner and its users see how a record has changed hands over time as it moves through the workflow.

As Christopher mentions, the best way to “catch” submission events with the product’s current capabilities is to add a service call to each submit action in the app. We have definitely discussed this as known product pain-point; it leads to extra work and duplication.