Detecting when a WriteRecord is New or Updated

May 1, 2007 at 9:17 am

Nathan’s enthusiatically followed up on his first contribution to eulogise about a couple of new Runtime Events…

This one is relatively simple but it is worth pointing out. Sometimes its the little things that make you weep for joy as a developer.

In the bad old days of Siebel (i.e. before 7.7), the world was running around clubbing each other over the head, saying “ugh” a lot and wearing animal skins. Then the light shone upon the world and we were given:

WriteRecordNew and WriteRecordUpdated.

These are Runtime Events that I noticed just recently. Many many times in config, you need to do something when a record is written. You place code on the WriteRecord event (so that you can avoid having to worry about the user doing Undo, stepping off a field and recorrecting etc). But then you need to do different things depending on whether the record is new or updated.

Usually what you needed to do was set some global variable when the NewRecord event fired, test that variable in WriteRecord, then clear the variable. It usually worked, but it was not elegant. I have seen implementations where the code on the WriteRecord event runs into the thousands. But we won’t mention those.

Now, the great and glorious Siebel gods have seen fit to now provide us with Runtime Events that distinguish between New and Updated records! Hallelujah brother!

Advertisements

Entry filed under: Configuration, Siebel, Workflow.

Client-side DLLs Manipulating Workflow Process Properties


Feeds


%d bloggers like this: