KBA-01597: Extending the Contact Save Transaction

Question:

How can I update other SQL data when a Spitfire contact is saved?
Can I inject complicated validations and business logic into the sfPMS data layer?

Answer:

When a contact is saved by the data layer, sfPMS also runs [custom].psf_ContactUpdated if it is defined in the SQL database. When you define [custom].psf_ContactUpdated it can update external data sources or do extended validation. The data layer provides the following values

  • @pUserKey – the UniqueIdentifier of the contact that has been updated
  • @pByUser – the UniqueIdentifier of the contact that caused the update (current user)
  • @pIsNew – 1 if the contact being saved was just added; otherwise 0

Informing the User

If your procedure raises an exception it will be display to the user.

Additional Comments:


KBA-01597;  Last updated: August 24, 2016 at 14:15 pm
Keywords: extension