Search This Blog

Saturday, February 2, 2013

Iscripts Example



Iscripts by Example:

Create a derived work record which starts with WEBLIB_XXXXXXXX
Include a field ISCRIPT1 which holds the peoplecode function for Iscript as show below.

Record Definition: WEBLIB_HELOWRLD


The below script , echoes the value entered in the text box.

Function IScript_HelloWorld()
Below is the code placed in fieldformula




Security:
After you create a WEBLIB record, and your functions, you must add them just as you would add a page to an application.

Adding the WEBLIB record to permission list PTPT1000. Below is the snapshot.



Click on Edit to control the type of access to the functions.

Testing: Login to PIA and copy the below URL.


http://localhost:8000/psp/hr9stg/EMPLOYEE/HRMS/s/WEBLIB_HELOWRLD.ISCRIPT1.FieldFormula.IScript_HelloWorld

Note: You need to replace 8000 with webserver port and hr9stg with the domain name.

The below script , echoes the value entered in the text box.
 

This completes the creation and testing of iscript.

Note:  You might have observed that just like the content reference which has a URL , the iscript is also a URL.
So, just like the way we register component through App designer to make the link available to the user in PIA, similar way we can register for iscript as well.

Will discuss in detail on the registring iscript in another post. Below arrow shows the registration wizard for Iscript in App Designer.


 





2 comments:

Unknown said...

Thank you, this was very easy and helpful to follow.

Regards,

Dan

Vikram said...

Thank you