28 July 2008

Weekly Dynamic: Contract Secrets

Full Disclosure and warnings first. My employer, I.B.I.S., Inc. wrote the Field Service modules (Including the Contracts module mentioned here) and later sold them to Microsoft. I.B.I.S. continues to provide development work on this module but I don't have any inside knowledge related to the modules. Anything in here I developed on my own. Also, this is tip has the potential to make a huge mess, use it at your own risk.
I've spent a lot of time with the Contracts module lately and thought I would share a little tip. There is a trigger on the Contract Lines table (SVC00601) that creates the lines in the Billing(SVC00603) and Revenue Recognition (SVC00604) tables.
What this means is that if you change the dates in the SVC00601 table via SQL, it automatically sets the right amount of revenue recognition lines. This is really useful in an initial setup scenario where you might have thousands of contracts coming to GP from another system. If you find an error, you can make mass adjustments via SQL. This could also be useful if you need to modify the Revenue Recognition schedule to match a schedule from an old system.
Be careful when you use this though. It's best used in a setup scenario where no billing or revenue recognition have occurred yet. Also, some choices in the Contract Header table (SVC00600) such as Revenue Smoothing or Billing Smoothing affect the behavior of the trigger.
It is nice to know that it's a SQL trigger and not something in the code that modifies billing and revenue schedules. It makes wholesale adjustments much easier.
Update: I just wanted to add that if any billing has been done, this trigger won't fire. This only works for initial setup.