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. 设置oracle_home

    set ORACLE_HOME=F:\app\rh\product\11.2.0\dbhome_1

  2. eclipse快速收缩展开代码

    快速折叠所有代码和展开所有代码都是CTRL+SHIFT+/

  3. sikuli常用方法学习

    Screen s = new Screen(); 1.在文本框中填入文本 以下两个方法都可以 type是用来在文本框中输入指定的文本 paste是用来在文本框中复制指定的文本 s.type(imgpa ...

  4. javascript delete方法

    学习delete可以参考下面两个博客,写的都很好,本文大部分参考与以下两个博客 http://www.cnblogs.com/windows7/archive/2010/03/28/1698387.h ...

  5. mysql如何给汉字按照首字母顺序排序

    select * from 表名 order by convert(列明 USING gbk) COLLATE gbk_chinese_ci asc

  6. memcpy、memmove、memset

    void * memcpy(void * dst, const void * src, size_t count) { void *res=dst; while (count--) { *(char* ...

  7. 阿里RDS备份恢复

    未使用root用户操作: 数据库版本要一致 数据目录:/data/mysqlbak/ 先按阿里给的步骤操作,最后出现一步出现,无法找到back_xxx.conf,但该文件已经存在.解决方法: sudo ...

  8. (转)将access数据库迁移到SQLserver的两种方法

    在实际项目使用中遇到的问题,将原文整理后以备后用. 原文地址(具体链接几次未知):http://www.jb51.net/article/41956.htm 方法1 使用ACCESS2007自带的数据 ...

  9. C and C++ 如何嵌套使用

    1. 要知道extern "C"的含义: (1) extern是C/C++中表明函数和全局变量作用范围的关键字, 该关键字表明其申明的函数和变量可以在本模块或者其他模块中使用. ( ...

  10. Golang在windows下交叉编译linux程序

    1.下载相关程序. Golang下载:http://www.golangtc.com/download Git下载:http://git-scm.com/download/ TDM-GCC下载:htt ...