The key to writing submit rules is to work within the DataSets. To manipulate (insert, update, delete) data from a submit rule is to modify rows in the DataSet. This varies slightly depending on whether you are dealing with a pre- or post-submit rule.