Creating an InfoStore object

If the logon was successful, then more work needs to be done. Firstly, you must ask the EntepriseSession's Service function to create an InfoStore object that will interface with the APS (continuing from the previous example in Adding a Logon function).

Example

var IStore;

IStore = Sess.Service ("", "InfoStore");

The InfoStore object allows you to do things such as query the APS and write changes back to the APS when you have modified Crystal Enterprise objects. Store the InfoStore object that the Service method provides in the Session object for later use.

Note:    The Session object is not the same as the EnterpriseSession. The former is used to store information about the user's current session with the Web Component Server while the latter is used to provide information about the user's current session with the APS.

//On Windows:

Session.Value("IStore") = iStore;


//On UNIX:

Session.Value("IStore").Item = iStore;

Remarks

Along with other items such as Cookies, URL arguments, and Form values, the Session object is used differently on Windows and UNIX.

Note:    Include the helper file, helper_js.csp which is placed by default in C:\Program Files\Crystal Decisions\Web Content\Enterprise\language. Replace language with the information appropriate to your version of Crystal Enterprise: use en for English or ja for Japanese. This file contains a number of functions for using objects in a platform independent manner.

Go to next step:

Creating a Logon Token



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com