HowTo: Creating IScripts

This page has moved.  Please update your links:

Step 1: WEBLIB_ record

You must put your PeopleCode on a record that begins with “WEBLIB_”. You can either create one or add onto an existing record that meets that naming convention.

Step 2: Create the PeopleCode Function

The function name should start with “IScript_”.


You can use the %Response to create the output HTML, XML, or other format. The Write function is the main function that you will use:

%Response.Write("<b>Hello, World</b>");


You can use the %Request object to read parameters that were sent to the script. For example, if the URL had “?EMPLID=00001” at the end of it, you could use the following PeopleCode to read it:

&emplid = %Request.GetParameter("EMPLID");

Step 3: Security

You must grant security to your IScript before you can view it. This is done on the Permission List just like the security for a regular page.

Nagivation to the Permission Online:

PeopleTools > Security > Permissions & Roles > Permission Lists

Go to the WebLibraries page/tab.

On that page, you will need to enter the record name of the script. Then, click on the Edit link to choose the specific IScript that you wish to grant access.

Step 4: Determine the URL

The URL for a component looks something like this:

… /c/MenuName.ComponentName.Market

The URL for an IScript looks something like this:

… /s/RecordName.FieldName.Event.FunctionName

See PeopleBooks for more information.

Step 5: Register Your IScript

If an end-user should access the IScript, you need to put a content reference in the menu for easy access. You can do so, by registering your script through the registration wizard. If you just intend to access the script via code, you don’t need to do this step.

When you open a record that begins with “WEBLIB_”, you will notice a new button on the toolbar for the registration wizard. Just click that button and follow the steps.

See PeopleBooks for more information.


These resources may not be as relevant:

6 Responses to “HowTo: Creating IScripts”

  1. Jeromy McMahon Says:

    Excellent addition! Thanks for providing this. Helped me out a lot in learning IScripts.


  2. praveen Says:

    Thank you for the post. I want o t know in details how an Iscripts works
    1.if I want ot add additional functionality of the page like auto comple to search fields on the page where to invoke these iscripts.
    2.if I want to interact with third paty webservices as per use keyin(same time ) we can not use any peoplecode events there on the page i hope iscripts can help to resolve these but i want to know how it works.
    3. a synchronus reuest msg should send and recieve when part of string tyed in the edit box.

  3. praveen Says:

    I am able to use IScript as content reference but it will not fulfil the requiremnet…

  4. digitaleagle Says:


    Here are a few thoughts in response to your questions:

    1. Its sounds like you need more than IScripts. You can use Javascript on your page to perform actions in the browser when a user types into a field. The javascript can tell the browser to load a URL in the background that would contain the data for your autocomplete. So, what I would do is have your javascript load the URL for your IScript. Then, the IScript would process and load the results either into XML or JSON format. The Javascript on the page would parse the data and present it to the user without ever refreshing the current page.

    You might consider using a library like jQuery for the javascript on the page. jQuery has quick and easy methods for loading a URL, and the UI library may have some functions that will make your autocomplete easier.

    2. For the web service, you might not need an IScript at all. You might be able have the javascript from the user’s browser interact directly with the webservice. Or, you could use javascript to load an IScript URL, which would in turn trigger your IScript PeopleCode and allow you to do what you need to do from PeopleCode.

    3. Again, Javascript is the tool you need for this type of event. If you have Deffered Processing turned off, the FieldEdit and FieldChange events trigger after the user changes a field. But, in reality, what is happening is PeopleSoft has some javascript that forces the page to reload when the user leaves a field that he changed. This is not what you want, and so, I understand what you are saying in that PeopleCode doesn’t work.

    Take a look at this jQuery reference:
    If you look at the Events > Event Helpers, they have a keypress(fn) function that will allow you to attach a function to the field’s keypress event.

    One big thing you have to keep in mind is that you have to make sure to test your javascript in all of the browsers that your users will be using. When writing PeopleCode, you just have to test the code running on the server, but javascript runs in the browser. Each browser works slightly differently. That is one of the reasons I like jQuery: they have already taken into account some of the browser differences.

    Here are some other posts that might help:

  5. praveen Says:

    Thank you for the responce…

    Can you help me me with some code or can you explain me the existing Iscript_timeoutwarning how it will be invoked?

    Like I have checked the source page of peoplesoft home,It has the Iscript_timeoutwarning script but how it will get execute after ome period of time.where the exact event get trigger it and get executethis code….

    I am not a Javascript programmer but with effort i ried to understand some.. but need some help from you thanks…

  6. praveen Says:

    Can you hel me how to call Iscript from Java Script.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: