Sometimes you would want to give users the option to click a button on the page and send them back to the Portal Folder they came from, or may be couple folders back! Here is how you go about doing that.

You can actually use the PeopleSoft delivered function NavPageURL to accomplish this! So, lets get started!

On your page, go ahead and add a button. Place the following PeopleCode at the Component Record Field level under FieldChange event

Declare Function NavPageURL PeopleCode EOPP_SCRTN_WRK.FUNCLIB FieldFormula;
&LINKURL = NavPageURL(%Portal, %Node, "your-folder-object-name", "PSC", "", "", "False", "", "", "");

%Response.RedirectURL(&LINKURL);

And here is the code for the NavPageURL function:

/********************************************************************/ /* Function: NavPageURL */ /* Purpose: Returns the Absolute URL value to the Navigation Page */ /* for a given collecton object name or folder object. */ /* Inputs: Nav Page PortalName, Nav Page NodeName, Nav Page */ /* Collection or Folder ObjectName, and URLType. */ /* Output: URL value as a string */ /* Format: &MYURL = NavPageURL("EMPLOYEE", "ERP", "MY_OBJECT", */ /* "", "", "", "", "") */ /********************************************************************/ Function NavPageURL(&PortalName As string, &NodeName As string, &ObjName As string, &URLType As string, &FolderName As string, &TargPortalName As string, &SecValue As string, &VirtualValue As string, &PTfname As string, &PTcname As string) Returns string; Local string &URL;
If All(&PortalName, &NodeName, &ObjName) Then
Evaluate Upper(&URLType) When = "PSC" &URL = GenerateScriptContentURL(&PortalName, &NodeName, Record.WEBLIB_EOPP_SC, Field.HOMEPAGE, "FieldFormula", "IScript_AppHP"); Break; When = "PSP" &URL = GenerateScriptPortalURL(&PortalName, &NodeName, Record.WEBLIB_EOPP_SC, Field.HOMEPAGE, "FieldFormula", "IScript_AppHP"); Break; When-Other &URL = GenerateScriptContentURL(&PortalName, &NodeName, Record.WEBLIB_EOPP_SC, Field.HOMEPAGE, "FieldFormula", "IScript_AppHP");
End-Evaluate;
&URL = &URL | "?scname=" | &ObjName;
If All(&SecValue) Then &URL = &URL | "&secondary=" | &SecValue; End-If;
If All(&FolderName) Then &URL = &URL | "&fname=" | &FolderName; End-If;
If All(&PTcname) Then /* pass either CFAN Cref or DFAN Fref, not both */ &URL = &URL | "&PORTALPARAM_PTCNAV=" | &PTcname; Else If All(&PTfname) Then &URL = &URL | "&pt_fname=" | &PTfname; End-If; End-If;
If All(&TargPortalName) Then &URL = &URL | "&targetportal=" | &TargPortalName; End-If;
If Upper(&VirtualValue) = "TRUE" Then &URL = &URL | "&isvirtual=" | &VirtualValue; End-If;
End-If;
Return &URL;

End-Function;

Send User to a Portal Folder的更多相关文章

  1. Visual Basic 函数速查

    Calendar 常数 可在代码中的任何地方用下列常数代替实际值: 常数 值 描述 vbCalGreg 0 指出使用的是阳历. vbCalHijri 1 指出使用的是伊斯兰历法. Color 常数 可 ...

  2. push or get File or Folder using scp wrapped with expect and bash

    经常需要把服务器的某些文件传到 Mac,或者获取 Mac 的一些文件到服务器.尽管有很多命令scp, ftp, rsync都可以,霸特每次都有敲好长的命令,好烦,而且还要输入密码.所以想着 wrap ...

  3. Send Push Notifications to iOS Devices using Xcode 8 and Swift 3, APNs Auth Key

    Send Push Notifications to iOS Devices using Xcode 8 and Swift 3 OCT 6, 2016 Push notifications are ...

  4. The specified file or folder name is too long

    You receive a "The specified file or folder name is too long" error message when you creat ...

  5. Portal Page的呈現

    先看一下在JSR168中提到的Portal page,可以了解一個Portal Page上大概有哪些element: OK...進入本次主題 PSML:PSML的全名是Portal Structure ...

  6. Overview Of Portal Registry And Content References

     Portal Registry Each portal is defined by a portal registry.A portal registry has a tree-like struc ...

  7. Step-by-Step Guide to Portal Development for Microsoft Dynamics CRM - 摘自网络

    The Challenge Oftentimes in the world of Dynamics CRM, the need arises for non-CRM users to gain acc ...

  8. [转]How to Send Ethereum with Web3.js and Node

    原文:https://davekiss.com/ethereum-web3-node-tutorial/   Ethereum took the web and cryptocurrency worl ...

  9. [转]How To Send Transactional Email In A NodeJS App Using The Mailgun API

    https://www.npmjs.com/package/mailgun-js 本文转自:https://www.mailgun.com/blog/how-to-send-transactional ...

随机推荐

  1. jhat中的OQL(对象查询语言)

    http://blog.csdn.net/wanglha/article/details/40181767 jhat中的OQL(对象查询语言) 如果需要根据某些条件来过滤或查询堆的对象,这是可能的,可 ...

  2. C++学习16 继承时的名字遮蔽

    如果派生类中的成员变量和基类中的成员变量重名,那么就会遮蔽从基类继承过来的成员变量.所谓遮蔽,就是使用新增的成员变量,而不使用继承来的. 成员函数也一样,如果函数名和参数签名都相同,就会造成遮蔽.如果 ...

  3. request.setCharacterEncoding 和常用内置对象 跳转

    1.直接转码 new String(name.getBytes("ISO8859_1"),"GBK") 2. request.setCharactorEncod ...

  4. DELPHI下的SOCK编程(转)

    DELPHI下的SOCK编程      本文是写给公司新来的程序员的,算是一点培训的教材.本文不会涉及太多的编程细节,只是简单讲解在DELPHI下进行Winsock编程最好了解的知识. 题外话:我认为 ...

  5. Ext.MessageBox

    Ext.require([ 'Ext.window.MessageBox', 'Ext.tip.*' ]); Ext.onReady(function(){ Ext.MessageBox.confir ...

  6. LayoutInflater的实例化

    获得 LayoutInflater 实例的三种方式 1. LayoutInflater inflater = getLayoutInflater();  //调用Activity的getLayoutI ...

  7. Sqoop增量从MySQL中向hive导入数据

    sqoop job --create incretest -- import --connect jdbc:mysql://10.8.2.19:3306/db --table table1 --use ...

  8. html——SVG

    SVG 指可伸缩矢量图形 (Scalable Vector Graphics) SVG 用于定义用于网络的基于矢量的图形 SVG 使用 XML 格式定义图形 SVG 图像在放大或改变尺寸的情况下其图形 ...

  9. FPS学习记录

    最近在网上查了一些FPS的相关知识,在此和大家一起分享.FPS(Frames Per Second):每秒传输帧数,它是图像领域中的一个术语. Frames Per Second更确切的解释是“每秒中 ...

  10. 【翻译习作】 Windows Workflow Foundation程序开发-第一章02

    1.2      Windows Workflow概览 微软的Windows Workflow Foundation(简称WF)是.NET框架3.0版的一部分..NET3.0其它主要部分是Window ...