Output Property set returned from Business Service method could not be captured in javascript calling environment

3.9k views Asked by At

We are trying to retreive data in a custom presentation model file in Siebel Open UI. We are invoking a method of business service with a input property set . We are able to invoke the BS method and everything is working as expected on Siebel side. But when we return from Siebel BS to Calling environment, In calling environment, The assigned variable is not getting populated.

Code in custom js file

var service = SiebelApp.S_App.GetService( "My BS" );
if( service )
{
    outPS = service.InvokeMethod( "GetDetails", inPS ); 
    alert("Value of OutPS    :"+ outPS);
    var test = outPS.GetChildByType('ResultSet').GetProperty("Mypropname");
    //tried var test = outPS.GetProperty("Mypropname");
    alert(Mypropname);
    //here outPS is coming as null, when we verify it from siebel side its populated
}

Please tell us if we need to change something Or any other tested way to get data from Siebel BC.

As Part of our customizaation, We need data from a Siebel BC to be available in this javascript file.

1

There are 1 answers

0
Gaurav Dharra On

The below mentioned code seemed to be working for me. Also please ensure the "out_prop_name" is exactly the same as one defined in the BS.

var svc = SiebelApp.S_App.GetService("BS Name");
var inp_svc=SiebelApp.S_App.NewPropertySet();
inp_svc.SetProperty("inp_prop_name","prop_val");
var out_svc=SiebelApp.S_App.NewPropertySet();
out_svc=svc.InvokeMethod("MethodName",inp_svc);
out_svc.GetChildByType('ResultSet').GetProperty("out_prop_name");