ActivateMultipleFields Method

The ActivateMultipleFields method activates more than one field. It returns nothing. It uses the following syntax:

BusComp.ActivateMultipleFields(SiebelPropertySet);

where:

  • SiebelPropertySet is a property set that identifies a collection of properties. These properties identify the fields that Siebel CRM must activate.

Example 1

The following example uses the ActivateMultipleFields method to activate all the fields that the property set contains, including the Account Products, Agreement Name, Project Name, Description, and Name fields:

var ps = SiebelApp.S_App.NewPropertySet();   
ps.setProperty("Account Products","");   
ps.setProperty("Agreement Name","");   
ps.setProperty("Project Name","");   
ps.setProperty("Description","");   
ps.setProperty("Name","");   
BusComp.ActivateMultipleFields(ps);

Example 2

The following example in Siebel eScript queries the Contact business component and returns the First Name and Last Name of the first contact that it finds:

var currRetValue={err:false}, retObj;
var model= SiebelApp.S_App.GetModel();
var ContactBC = model.GetBusObject("Contact");
var ContactBC = boContact.GetBusComp("Contact");
if (ContactBC)
  {
  var fieldsPS = SiebelApp.S_App.NewPropertySet();
  var valuesPS = SiebelApp.S_App.NewPropertySet();
  fieldsPS. SetProperty("Last Name", "");
  fieldsPS.SetProperty("First Name", "");
  ContactBC.ActivateMultipleFields(fieldsPS);
  ContactBC .ClearToQuery();
  currRetValue=ContactBC.ExecuteQuery();
  if (!retObj.err) {
    retObj=currRetValue=ContactBC.FirstRecord();
    if (!retObj.err) {
      ContactBC .GetMultipleFieldValues(fieldsPS, valuesPS);
      var slName = valuesPS.GetProperty("Last Name");
      var sfName = valuesPS.GetProperty("First Name");
    }
  }
}
return currRetValue;