Setting of SSA Primary Field through Business Service (Doc ID 497241.1)

Last updated on AUGUST 18, 2016

Applies to:

Siebel Workflow - Version 7.8.2.1 [19216] and later
z*OBSOLETE: Microsoft Windows 2000
Product Release: V7 (Enterprise)
Version: 7.8.2.1 [19216]
Database: Oracle 9i
Application Server OS: Microsoft Windows 2000 Server SP 3
Database Server OS: HP-UX 11i

Check for Relevance on Feb-24

This document was previously published as Siebel SR 38-2972460741.


Symptoms

SBL-DAT-00402

We are trying to call a Business Service via Workflow, to set the Primary Position on an Account.

We have tried the solutions suggested in SupportWeb, without success. We have tried an 'slimmed down' version of our script without success. For testing we are using an existing account where we have 2 positions on the sales team with SADMIN set as the primary.
The error we keep getting is:
This operation is not available for read only field 'SSA Primary Field'.(SBL-DAT-00402)

Here is the reduced code:

function TestMVGUpdate(Inputs)
{
TheApplication().TraceOn("c:\\trace.txt", "Allocation", "All");
try
{
//Instantiate BC
   var boAcct = TheApplication().GetBusObject("Account");
   var bcAcct = boAcct.GetBusComp("Account");
   
   //Log parameters and prequery for required record.
   TheApplication().Trace("ViewMode=" + bcAcct.GetViewMode());     
   //bcAcct.ClearToQuery();
   bcAcct.ActivateField("Sales Rep");
   bcAcct.InvokeMethod("SetAdminMode", "TRUE");
   bcAcct.SetSearchSpec("Id", "1-XZ9"); //Account id hardcoded for testing
   bcAcct.ExecuteQuery(ForwardBackward);
   TheApplication().Trace("Acct:" + bcAcct.GetFieldValue("Id"));
   TheApplication().Trace("Current Position = " + TheApplication().PositionName());
   
   //Get Sales Team
   
   var bcMVG = bcAcct.GetMVGBusComp("Sales Rep");
   //bcMVG.ClearToQuery();
   bcMVG.ActivateField("SSA Primary Field", "Y");
   bcMVG.ExecuteQuery();
   var foundRecs = bcMVG.FirstRecord()
   
   while (foundRecs )
      {
      if (bcMVG.GetFieldValue("Id")=="1-R2M") //Look for non-primary position (hardcoded for testing)
        {
        TheApplication().Trace("Found new primary - Setting Primary" );
        bcMVG.SetFieldValue("SSA Primary Field", "Y");
        bcMVG.WriteRecord();
        }
      else
        {
        TheApplication().Trace("Move on to next record");
        }
      foundRecs = bcMVG.NextRecord();
      }
TheApplication().Trace("End of loop"...

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms