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. crm SSRS 报表 导出格式控制

    如果是使用的网页嵌入ReportView的方式的,可以在aspx上加入js来控制导出格式: <script src="js/jquery-1.9.0.js"></ ...

  2. CRM IFRAME 显示地图

    作者:卞功鑫  ,转载请保留.http://www.cnblogs.com/BinBinGo/p/5274409.html 需要背景: 现在已经有经纬度,需要在地图上显示出来. 环境: CRM 4.0 ...

  3. java中的final总结

    Java关键字final有最终的,不可改变的含义,它可以修饰非抽象类.非抽象类成员方法和变量. 报错:类"TestFinal"要么是abstract,要么是final的,不能两个都 ...

  4. lambda表达式、内置函数、进制和文件操作

    lambda表达式 定义函数(普通方式)def f1(): return 123 f2 = lambda : 123 def f3(a1,a2): return a1+a2 定义函数(lambda表达 ...

  5. (easy)LeetCode 242.Valid Anagram

    Given two strings s and t, write a function to determine if t is an anagram of s. For example,s = &q ...

  6. 翻译:深入 AngularUI Router

    原文地址:http://www.ng-newsletter.com/posts/angular-ui-router.html ui-router: https://angular-ui.github. ...

  7. 使用 Cocos2d-x 3.1.1 创建 Windows Phone 8 游戏开发环境

    cocos2d-x 是目前流行的游戏游戏开发框架,目前最新的版本是 3.1.1, 网上有些教程已经比较老了,本文将会介绍如何使用最新的 3.1.1 创建 Windows Phone 8 开发环境. 本 ...

  8. C/C++程序基础

    作为一名cocos2dx前端(客户端)开发,知乎上看到一片文章,怎么看待做手游cocos前端开发,lua用的多,c++用的少面试会被鄙视? 为了不被鄙视,所以要学好C++,多做积累.本文主要是根据&l ...

  9. 举例说明划分子网,路由器IP地址

    划分子网的方法是从网络的主机号借用若干位作为子网号,主机号相应地减少了同样的位数.在划分子网前,IP地址是两级结构的:网络号,主机号. 划分子网后,两级IP地址在本单位内部就变为三级IP地址:网络号, ...

  10. 【最后一篇API译文】Android开发-API指南- Contacts Provider

    Contacts Provider 今年加入了某字幕组,加之杂事颇多,许久未添新文了,惭愧之极. 在听闻 Google 即将重返中国后,近日忽又发现官方网站正在放出 API 中文版,比如本文.当然不是 ...