Table and Entity Level Scripts can be thought of as a bit like SQL triggers. They allow a developer to create scripts that are run when certain database interactions take place. They are defined as javascript and stored in meta data. The scripts are then executed when a record is inserted, updated, or deleted on a specified table in CRM.
Below are different articles that have been written over time which cover creating these scripts.
Objects available in Table and Entity level scripts
- Objects Available in the Internal COM API
- CurrentUser object in Serverside Code
- The Values() collection
- More about the Values and FormValues collections
Designing Code for re-use across Table and Entity Level Scripts
Typical Table Level Tasks
- How do I automatically create a reminder task for a user when an opportunity is inserted?
- Sending an Email from a Table Level Script
- Conditionally send e-mail on entity creation
- Collecting Information from Checkboxes in TableLevel Scripts
- Handling the Data in Multi Select fields in Validate Rules and Table Level Scripts
- Using a Table Level Script to Track Changes to Data Made by Users.
- Setting or Updating Date Fields using a Table Level Script
- How can I get the SID in Serverside scripting?
- Using Hidden fields to detect which System Action triggered a Table Level Script.
Cascading a change through the system
- A Table Level Script to update Opportunities when a Company is Reassigned
- Taking a Snapshot of Currency Exchange Values
Dynamically setting and changing data in an insert or update
- An example of a Table Level Script showing update of data not submitted from browser
- Correcting inbound data using Table Level scripts and Values() collection
- Using a TableLevel script to Update Submitted Values
Using Table Level scripts in the context of Administration
Debugging and troublshooting scripts
- How do you know if your Table Level Scripts are being executed?
- TableLevel Scripts and SQL TimeOuts
- Interacting Table Level Scripts: A Chain Reaction
- Write to the CRM logs in a server-side script
Entity Level scripts with Rollback