Unable to call NewRecord method after GoToView on Applet Load event (Doc ID 491659.1)

Last updated on MARCH 02, 2017

Applies to:

Siebel Tools - Version 7.5.2.211 [16061] to 8.1.1.9 [23016] [Release V7 to V8]
z*OBSOLETE: Microsoft Windows 2000
Database: Microsoft SQL Server 2000 SP 2
Application Server OS: Microsoft Windows 2000 Server
Database Server OS: Microsoft Windows 2000 Advanced Server SP 2

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


""Checked for Relevance on 25-JUN-2013""
""Checked for Relevance on 14-DEC-2013""

Symptoms

We are creating new applets and views for Project Items. When creating a new record from List View, we want to redirect the user to an Activity View. I’ve tried to use control user prop on the NewRecord control to specify the view and applet I want to use, but this does not work. I’ve used this in approach in eService and it works fine.

Changes

placed the following eScript server code on the Contact List Applet and implemented a new button that invokes the custom Test method. When clicked the button will navigate to the Contact Detail - Personal Address View and create a new record in the Contact Form Applet at top of the view.


function WebApplet_PreInvokeMethod (MethodName)
{

if (MethodName == "Test")
{

// flag creation a new record when navigated to view
TheApplication().SetSharedGlobal("CreateNewRecord","TRUE");

// goto the view
TheApplication().GotoView("Contact Detail - Personal Address View");
return (CancelOperation);
}

else
return (ContinueOperation);
}





function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
{

if (MethodName == "Test")
{
// enable the button
CanInvoke = "TRUE";
return (CancelOperation);
}

else
return (ContinueOperation);
}



placed the following code on the Contact Form Applet to create a new record when the Load event is triggered and the shared global variable has been set (so regular user navigation to the view does not create a new record).


function WebApplet_Load ()
{

// create a new record on view navigation if necessary
if (TheApplication().GetSharedGlobal("CreateNewRecord") == "TRUE")
{

// clear global variable
TheApplication().SetSharedGlobal("CreateNewRecord","");

// create new record in applet
this.BusComp().NewRecord(NewAfter);
}

}

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