Saturday, March 24, 2007

Bypassing the Search page :)

As usual, Clients are always there to come up with strange requests. We as Consultants end up tweaking the code or sometimes doing what PeopleSoft also wont have advised us to do :-D
One of such requests was taken by my Client, the users were complaining that they were losing lot of time in searching for the tasks which are due in their bucket. So they wanted to bypass the search page and directly get the tasks (read results) once they click on the "My Task List" in PS CRM.
The users were requesting the Task List page to show the pending and open tasks for the last 2 weeks of a Sales User logged in to be shown. Initally, we were like this is not possible, blah blah and all.. but when the client was firm on this requirement, we were left with no choice but to work on this requirement.
To start off with; all requirements were captured . Functional design and technical design was done. The ral change came when the coding phase started. We were just thinking how will we do this :-)
We took a trace on the click of Search button and what we got :-( a trace file of around 45 Mb!!!!!!!!!!
tht was like some 2 to 3 textbook of 5,000 pages :-) I bet even my whole engineering material (softcopy) will not cross 45 Mb
Painstakingly, we started analysing the trace file . one day, over.. two days, over..
it took around 8 painstaking days to realise the whole flow of the RB_FILTER_FORM app package and related app packages for the Task List component.
But at the end of 8 days, we were just wondering what a brain would those PS designers would hve possessed.
In RB_FILTER_FORM, there is a search object created for that app package and it is configured to run for any component in PS. Once the search object is created, the component name should be fed into this search object.
Now, using this search object created, we can pass various search parameteres like =,>,<,<>,and,or, etc etc. This is done by using the property.value = ;
Also, the search fields can be specified in the same way.
the magic starts when u type "Search_object.Execute". This piece of code is similar to chossing all values in the search page of PeopleSoft and clicking on the Search button.
Try this concept on any of your components and see the power of PeopleSoft code. :-)