After Execute Query, Applet Stays In Query Mode (Doc ID 2277189.1)

Last updated on JUNE 15, 2017

Applies to:

Siebel CRM - Version 15.14 [IP2015] and later
Information in this document applies to any platform.

Symptoms

On : 15.14 [IP2015] version, Client Functionality

ACTUAL BEHAVIOR
---------------
when we do a query that returns records on VBC applet stays in query mode after executing query

EXPECTED BEHAVIOR
-----------------------
when we do a query that returns records on VBC applet should not stay in query mode after executing query

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Login to Application
2. Go to VBC Applet, Click on Query Button
3. Check VBC returned data
4.Check the VBC Applet mode

Details:

Simple VBC with no external data involved. The Parent applet is a List
applet that shows a Form applet when in Query Mode. The child applet is
based on the same VBC as the parent, but also has a toggle.

1) Create BS > AATestBS
2) Add Methods Init, Update and Query
3) Add the following script:

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
    switch (MethodName)
    {
        case "Init":
            Init(Inputs, Outputs);
            return (CancelOperation);
            break;
        case "Query":
            Query(Inputs, Outputs);
            return (CancelOperation);
            break;
        case "Update":
            Query(Inputs, Outputs);
            return (CancelOperation);
            break;

    }
    return (ContinueOperation);
}

function Service_PreCanInvokeMethod (MethodName, &CanInvoke)
{
    if (MethodName == "Init")
    {
        CanInvoke="TRUE";
        return(CancelOperation);
    }
    if (MethodName == "Query")
    {
        CanInvoke="TRUE";
        return(CancelOperation);
    }
    if (MethodName == "Update")
    {
        CanInvoke="TRUE";
        return(CancelOperation);
    }
    return (ContinueOperation);
}

function Init (Inputs, Outputs)
{
    Outputs.SetProperty("Name","");
    Outputs.SetProperty("Date","");
    Outputs.SetProperty("ID","");
    TheApplication().SetProfileAttr("teste", "1");
}

function Query (Inputs, Outputs)
{

    var StarterRec = TheApplication().GetProfileAttr("teste");
    if(TheApplication().GetProfileAttr("teste") == "3")
    {
        TheApplication().SetProfileAttr("teste", "2");
    }
    else
    {
        if(TheApplication().GetProfileAttr("teste") == "2")
        {
            TheApplication().SetProfileAttr("teste", "1");
        }
        else
        {
            if(TheApplication().GetProfileAttr("teste") == "1")
            {
                TheApplication().SetProfileAttr("teste", "3");
            }
        }
    }
    for (var i = StarterRec; i <= StarterRec; i++)
    {
        var psOutputs = new Array;
        psOutputs[i] = TheApplication().NewPropertySet();
        psOutputs[i].SetProperty("Name","TestName" + i);
        psOutputs[i].SetProperty("Date","01/01/2016");
        psOutputs[i].SetProperty("ID","TestID" + i);
        Outputs.AddChild(psOutputs[i]);
    }
}

function Update (Inputs, Outputs)
{

}

4) Create VBC - control N on BC, not wizard. > AATestVBC class = CSSBCVExtern
5) Create Fields Name, ID, Date (Set date Type to DTYPE_UTCDATETIME
6) Define BC user prop Service Name > AATestBS
7) Add AATestVBC to Service Request BO

Create 3 Applets
8) Create an Applet (Form) AATestC1 Applet using Wizard and AATestVBC. Edit
Mode, and all fields and controls. If not there, drag Query control to button area.
9) Create an Applet (list) AATestP1 Applet using Wizard and AATest VBC. Use
"Applet List (Base/EditList)" for Base and EditList, and use "Applet Form 4
Column (Edit/New)" for Edit Mode. All fields and controls.
10) Drag Query and Execute Query to the List Applet layout.
11) Change the Edit Applet Web Template to name of Query, Type Query.

12) Create a new View AATestView by copying "Service Request List View (SCW)",

13) Change to use Applets AATestP1 on top to be the list applet based on the
VBC that is to be queried. AATestC1 on bottom to be the form applet that
will toggle. Changed View to use Base mode for AATestP1
14) Add AATestView to Service Request Screen with a Parent Catagory of
Service Request List

15) Copy an Applet (form) AATestC1 creating AATestC2 Modifying something to
identify which applet is in use. I set the Name Label to show Name C1 or Name C2.
16) Modify AATestC1 to add Toggle info. Name = TestName2 toggles to AATestC2
17) Compile all changes to Thick Client SRF.

18) Log into Thick Client
19) navigate to Administration - Applications - View and add AATestView
20) navigate to Administration - Applications -> Responsibilities, Add
AATest Responsibility, with view AATestView and User SADMIN.
21) Clear Cache and Restart session.
22) GO to Site Map, search for AATest, and navigate to new View.

Query/Go multiple times, seeing that the record changes each time. When it
gets to TestName2, and toggles successfully

Changed AATestP1 applet to inactivate Base Applet Web Template, and changed
Edit to be Query, and EditList to Base for both Name and Type.
Changed AATestView, View Web Template of AATestP1 to use Applet Mode of Base

Query/Go multiple times, seeing that the record changes each time. When it
gets to TestName2, the list is not presented. The next record is presented
in Form mode, and the List did not render.



BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot see the VBC Applet mode changed even after execute the Query.

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