Siebel Open UI >  GetProfileAttr/SetProfileAttr method in Applet_InvokeMethod event causes Context Error in Open UI

GetProfileAttr/SetProfileAttr method in Applet_InvokeMethod event causes Context Error in Open UI

When attempting to pick a value from the pick applet, the following error occurs.

ERROR
-----------------------
An error happened during restoring the context for requested location.(SBL-UIF-00313)

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. In Siebel Tools, query for "Service Request Detail Applet".
2. Add the following script in browser Applet_InvokeMethod event:
var sTest = theApplication().GetProfileAttr("BScript");
3. Compile the changes.
4. Login to Siebel application in Open UI mode.
5. Go to Service Request > Service Requests List.
6. Create a new record at the list applet.
7. Click on "Last Name" to invoke the pick applet.
8. Select any name.
9. Go to the detail applet and click on the "Last Name" to invoke the pick applet.
10. Click on any name or "Cancel" button, you will get the following error:

An error happened during restoring the context for requested location.(SBL-UIF-00313)

In another scenario, the pick applet does not show up and here are the steps:

1. With the same configuration as above, login to Siebel application in Open UI mode.
2. Go to Service Request > Service Requests List.
3. Create a new record on the form applet.
4. Click on "Last Name" to invoke the pick applet. Nothing happens after a long while. The pick applet does not get popped up.


Due to this issue, users cannot pick any value from the pick applet.

CAUSE
The following statement in the Applet_InvokeMethod event of the invoking applet is causing the error:
var sTest = theApplication().GetProfileAttr("BScript");

Bug 17831577 has been logged to address this and closed as Not a Bug.

SetProfileAttr method causes the same behavior as well.

SOLUTION
As a workaround, move the "GetProfileAttr" statement within in the if-statement in Applet_InvokeMethod event.