Few days back working with browser script and I ran into a problem which took me almost 2 days to solve. Just because of the fact that Browser Scripts are different from Server Scripts.
The Script was simple, it called a Business service which set some profile attributes and based on the values of those profile attributes I needed to show the confirm message box. But the logic that I had written was working well when invoked for the first time, but second time browers scripts were not being called. So, In simple words browser script was working for just one time and then browers scripts got corrupted and stopped working.
In the end these points turned out to be the culprits.
- TheApplication : The syntax for TheApplication is different, t in the is small and it is written like theApplication e.g.
- SetProfileAttr: This came as biggest surprise to me. My code had a line written
This line resulted in corruption of browers scripts hence they didn’t fire again. As soon as I change it to
theApplication().SetProfileAttr(“Profile”,””)everything started working fine.
I was not able to determine the actual reason for this behaviour may be Siebel SR might put some light on it 🙂 or may be somebody out there has already gone through the ordeal and might know the answer 😉 Please enlighten me…..
The moral of the story is use small theapplication and never make a profile attribute null in browser script.