Hello friends…My manager ask me to invoke a BS from PM file, get output to show it on UI using PR.
Well it looks simple as we can find few lines from bookshelf, how to call BS from PR but believe me its not that much easy. I am using 8.11, so this post talks about that only.
Lets go step by step what I followed and check the final step….
[su_heading size=”20″]Create a function in PM to invoke BS:[/su_heading]
[su_note note_color=”#b3b0b8″ text_color=”#1c1e1d”][su_spoiler title=”Click to see the code”]
function invokeBS () {
var inPS = SiebelApp.S_App.NewPropertySet();
var service = SiebelApp.S_App.GetService( "Dummy BS" ); //get service
if( service ){
var outPS = service.InvokeMethod( "DummyMethod", inPS); //invoke the method
//on success we get a property set with type result set
var resultSet = outPS.GetChildByType("ResultSet");
if(resultSet){
//let assume we get a string as output
var outps = resultSet.GetProperty("dummyprop");//set as output property inside BS
this.SetProperty("pmProperty",outps); // set output as PM property
}
SiebelApp.S_App.uiStatus.Free(); //to remove the wait icon
returnStructure ["CancelOperation"] = true; //return cancel operation so nothing on Server side is invoked
}
}//end of func
[/su_spoiler][/su_note]
I am assuming that you guys know how to use this PM function to reflect these in PR and all.
So, now we have propertyset available in PM what we set in BS inside Siebel. But its not done, when we call thsi function we will have a Siebel error: Could not find ‘Dummy BS’ service
[su_heading size=”20″]Register BS in Application User Property:[/su_heading]
Inside tools, Go to Application -> User Property and make an entry for your BS.
Name: ClientBusinessServiceN (N is your number of BS entry)
Value: Dummy BS (BS name)
thats it…as per the process but still I am getting the same error. I was frustrated untill came to know that its a bug in 11 and we need enable something inside Menu. Thanks to Neel.
[su_lightbox type=”image” src=”http://askmesiebel.com/wp-content/uploads/2014/04/BS_Bug.jpg”]
[/su_lightbox]
[su_heading size=”20″]Bug fix:[/su_heading]
[su_list icon=”icon: check”]
- Inside Tools, Go to Menu Object
- Query for “CRA Generic WEB”
- Inside its child, query for “Help – About Record”
- by default it is inactive, then activate it and compile.
[/su_list]
Thats work for me, if you are still facing problem then you have to move to PatchSet 3 (Patch id:18027681).
Hope it will help someone like me.
[su_divider]
@AskmeSiebel
6 comments for “Siebel Open UI: Invoke Business Service from PM file”