Friday 29 May 2015

Controlling execution of a script from List of Values. .

Hi all,  i had a requirement where i had to control the execution of script on many business component's. The exact requirement was that client had deployed a new Mobility application for iphone and ipad and wanted to capture the usage of the application and details of users but he wanted to track the usage for some period of time only. We had the solution ready but were struck at the point of how to stop execution of code (we wrote script on BC which called a wf asynchronously) without making any srf change.
So we thought of using the following approach.
1.Created 2 LOV's with value On and Off.
2. In the script block added a condition to check the value of LOV before executing script.
3. If value of LOV was On then only script was fired else not.

Sample script looked like

If(LookupValue('DEVICE_TRACKING'),'ON')
{
Custom script here
}
else
{
Do not execute script
}

Note: please refer the exact syntax from bookshelf

So this was completely handled with LOV values ,client was given the access to change the value of LOV once he was done with tracking or if he ever wanted to capture the tracking. He could just set the value to On to start the tracking which led to execution of script or set it to Off if he wanted to bypass the process.

This approach helped me use lov's as switch . . :-)     . . cheers.

I will share details of how to call a workflow asynchronously and difference between Synchronous and asynchronous workflows in upcoming posts.

No comments:

Post a Comment

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...