Search This Blog

Saturday, October 9, 2010

iScripts

This is an area which I never worked before. This blog post by Jim gives you the best on iScripts. Go ahead and read the same.


Below screenshot gives you the difference between a regular URL and an iScript URL.




How do I create one?

--Create the PeopleCode in a Weblib

--Add Security for your IScript

--Create the link for your IScript


Create the PeoplCode in a Weblib

--Weblib’s are like Funclibs. They should be Derived Work Records. Usually a single field (Funclib) is enough.

--Place your code in the FieldFormula Event

--Each Iscript Function must begin with the string Iscript_ (i.e. Iscript_HellowWorld)


Add The Security

--Access to Weblibs is granted via Permission Lists

--Special Weblib tab on the Permission List tab

--Access is granular to the Iscript (Function) level


Create the Link

--Where am I accessing the weblib from?

--If from PeopleCode/Page use Button HyperLink type field of at least 254 length!

--Set as External Link, Dynamic URL

--Use deleivered functions to set field value. (i.e. GenerateScriptContentURL)

--Or you can use a Content Reference.


Few points worth to be noted:

--you can generate an IScript URL using the PeopleCode built-in function GenerateScriptContentURL.

--if you just want to view/print the component without the header and menu, then you can use the GenerateComponentContentURL function to create a URL to the component that does not include the portal markup. The GenerateComponentContentURL function creates a URL that matches the CREF's URL but uses the psc servlet rather than the psp servlet.


--"is this a psp or psc URL? I ask because this makes a difference in regards to the URL you see in the browser. If it is psp, then what you are seeing is the URL to your iScript plus the portal information. In this case, the actual URL to the content is in an iframe. If you use the psc URL, then you bypass the portal frameset and go direct to the content."


Anoop Savio

No comments:

Post a Comment