SiebelUnleashed Forum is up and running.. Check out the new forum. | Next Tip »Home

Multiple Records selection and Pick Applet

OkAvarageGoodVery GoodExcellent (5 votes, average: 4.60 out of 5)
Loading ... Loading ...

Siebel Unleashed forum is finally serving it purpose for what it was opened. There are lot of people asking questions and more importantly lot of people answering questions.

So, if you are not already its member I suggest you to become one immediately by clicking here so that you don’t miss much. Here is another interesting requirement that I would like to share with you all which was asked by THusvaeg and he was considerate enough to share the solution that worked for him.

Requirement:

I have a user request that you can select mulitple records in the list applet and then change a value for all records at the same time. The field they want to change uses a pick applet in the form applet, and it is through this pick applet they wish to change all the records to the same value.

Solution

Here is the script that THusvaeg provided that is working for him

function XX_PreSetFieldValue(FieldName, FieldValue)
{
var ActiveViewName = TheApplication().ActiveViewName();

// selecting the views under the BC for which the multiple selection should be available, could repeat this for any view / BC
if(ActiveViewName == “XX Vessel List View” || ActiveViewName == “XX Vessel List View – Admin”)
{
// this if must be reiterated for every field you want to work with multiple selection (why we don’t have it for the entire application)
if(FieldName == “XX Fleet Manager Last Name”)
{
var oThisBO = this.BusObject();
var oXXAssetBC = oThisBO.GetBusComp(“Asset Mgmt – Asset”);
var sConId = oXXAssetBC.GetFieldValue(“XX Fleet Manager Id”);

var bFirstSelected = oXXAssetBC.FirstSelected();
while(bFirstSelected)
{
oXXAssetBC.SetFieldValue(“XX Fleet Manager Id”, sConId);
bFirstSelected = oXXAssetBC.NextSelected();
}
}

if(FieldName == “XX Super Intendent Last Name”)
{
var oThisBO = this.BusObject();
var oXXAssetBC = oThisBO.GetBusComp(“Asset Mgmt – Asset”);
var sConId = oXXAssetBC.GetFieldValue(“XX Super Intendent Id”);

var bFirstSelected = oXXAssetBC.FirstSelected();
while(bFirstSelected)
{
oXXAssetBC.SetFieldValue(“XX Super Intendent Id”, sConId);
bFirstSelected = oXXAssetBC.NextSelected();
}
}
}
}

Executor another user has taken it step further by improving it and incorporating certain best practices that we use while scripting. You can follow the thread here.

Related Posts


Article by neel

Authors bio is coming up shortly. neel tagged this post with: Read 416 articles by neel
View Comments Post a Comment
  1. Ajaya Kumar says:

    where is the definition of the functions “FirstSelected() and NextSelected()” which are used in the above script? They are not siebel provided onces right?

  2. neel says:

    They are siebel provided :)

  3. Ajaya Kumar says:

    i don’t find those functions in the 7.8 eScript pdf..Can i know the pdf file name u are reffering to?

  4. Ajaya Kumar says:

    i can only find “NextRecord()” , but not “NextSelected()”

  5. Eugen says:

    You will find, while working with Siebel, a lot of functions that are not properly documented. But you should use the siebel Tools Help.
    Help –> Contents –> and enter FirstSelected, or NextSelected

    Regards,

    Eugen

  6. Ajaya Kumar says:

    Thanks Eugen..i could find in Tools Help.

  7. Niraja says:

    Can someone tell me how to pass on the selected record values to an pick applet which is based on a virtual BC. I will try to explain it with an example.

    Navigation
    ————

    1. I select multiple opportunities
    2. Click on a button
    3. This button should open an applet ‘A’ that is based on a virtual BC.
    4. This applet ‘A’ takes few input from users.
    5. submit button is clicked on applet ‘A’.

    Expected behavior:
    ——————

    I want the selected opportunity id’s to be passed on to applet ‘A’ ,where it will be processed by a Business Service based on user input.

  8. nandan says:

    hi all,

    i have a requirment .Generally in siebel we can change value of a single value field using change record option. But how to change value of a MVF using change record .Please suggest.

blog comments powered by Disqus

Polls

Do you know how to use replace function?

View Results

Loading ... Loading ...