Tuesday, August 3, 2010

Correction to Code - from Getting Started with SIFs

In the last post I had a couple of lines of code added to the browser script and server script of the application that you use... Neel posted a comment to say he was having some trouble using 8.1 - I'm not sure that this error is to blame, but it can't be helping!

Hopefully this correction will help get the code at least running.

So, the correct code for the server script declarations section of the application you are using should be:

var oBS:Service = this.GetService("MFramework");
oBS.InvokeMethod ("BuildFramework", this.NewPropertySet(), this.NewPropertySet());

while the following is the correct code for the new method in the browser script of the application you are using:

function BuildFramework()
{
    var bsUi = theApplication().GetService("MFramework");
    bsUi.InvokeMethod("BuildBsFramework",theApplication().NewPropertySet());
};

I've added this. and theApplication(). in front of the calls to the NewPropertySet() method, which hopefully will help things run.

3 comments:

  1. Well, I reached the next step.

    I had to start from scratch... just took the sekelton of the business service and see what is wrong.

    Major problem that was causing the issue was the declaration section of the Mframework BS.

    var o_LocalFramework = new Class_Main();

    When I just declared the oLocalFramework and intialized it later in BuildFramework function.. then skeleton started working..

    I am now getting error while trying to call the actual function.
    I have defined just one record in my BS and getting the following error

    Unhandled Excpetion: getRecord is not defined... while executing the following line

    fwork.BusComp.getRecord("Employee.Employee", TheApplication().LoginId(), ["Full Name"])["Full Name"];

    Hopefully will be able to overcome this also and get his working...

    ReplyDelete
  2. Hi Neel,

    Sorry this has taken so long - I've diversified of late into .net - so only just getting back to Siebel in the last day or two.

    Is this on the Browser side or Server side?

    I'm away from my Siebel machine at the moment (actually on Linux!), so I may have an inaccuracy or two here:

    One thing that's needed for the browser side to work is the addition of an entry in the list of Client Business Services in the config file - so at the end of the list add:

    ClientBusinessServiceXX = "MFramework"

    (or if you renamed the BS then whatever this is called)

    XX is the next number.

    Other than that I wonder is it worth trying a few things - I use "javascript objects" for all this - so the Framework had an "object" called BusComp which in turn has a member called "getRecord" (and others) - this in turn is a function.

    Try creating some basic objects and see if you can get at the properties in script - bookshelf actually has some examples - a rectangle if I remember - this will prove that objects behave correctly or not.

    Hopefully some of that may be helpful... if not let me know,
    Matt

    ReplyDelete
  3. Can you please repost the source SIF's download link. The earlier link provided seems to be not working.

    ReplyDelete