Skip to content

veeva/vsdk-hello-doctype-trigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDK Doctype Triggers

Doctype Triggers are a new Vault Java SDK entry point that allows Vault application developers and customers to extend Vault Document functionality. Triggers execute at the document version model layer with pre- and post- events for insert, update, and delete actions on document metadata.

Documents have a complex data structure with both a hierarchical Doctype structure and versioning. In Vault, actions are performed on document versions in bulk across Doctypes. Therefore, triggers will fire on document and document version events only.

Overview

This project contains 3 Doctype Trigger examples:

  • DefaultDocumentFieldValue: This trigger fires on a BEFORE_UPDATE event. If title__v is blank, it sets the value to the same value as name__v
  • PreventLowercase: This trigger fires on a BEFORE_UPDATE event. If name__v starts with a lowercase letter, a row level error is set to prevent the update.
  • StartJobOnFieldChange: This trigger fires on an AFTER_UPDATE event. If the name__v field value has changed, an async SDK Job is started to notify the document owner.

All triggers are set on the base_document__v Doctype and will fire for all document types in the Vault.

Setup

  • Download the Hello World Project for SDK Doctype Triggers
  • Deploy the HELLO-SDK-DOCTYPE-TRIGGER VPK located inside of the Hello World project at: vsdk-hello-doctype-trigger/deployment/packages/. This package contains the configuration and code for this project.

To make changes to the code and deploy those changes to a Vault, use the Vault Java SDK Maven Plugin. The pom.xml file includes the plugin details, but you must update the configuration values.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages