15行的PeopleCode搞定XML Publisher
摘要:import PSXP_RPTDEFNMANAGER:*;&oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn("FRED_XMLP"); /* setparameter of ReportId */&oRptDefn.Get();/* fill query runtime prompt record */&rcdQryProm...
阅读全文
Peoplecode Trace in a File
摘要:Local File &fle;&fle = GetFile(GetCwd() | "/files/Test.xml", "W", %FilePath_Absolute);&fle.WriteLine("Hi");&fle.Close();Test.xml can Found in...Web Server: psoft > appserv > DATA...
阅读全文
Call Exec in PeopleCode
摘要:我想在Application Engine里加一段调用命令行的代码,All PeopleCode is executed on the application server. So if you're calling an interactive application, you receive an error. There shouldn't be any application intera...
阅读全文
Check Email Address and Type on a PeopleSoft Grid
摘要:What I would like to accomplish is every time the user adds a new email address i would want to check for the following:1. Check for blank email type2. Edit to check for '@' character3. Check if email...
阅读全文
Dynamic Prompt Table Depending on a Drop Down Value
摘要:how to dynamically assign a prompt table depending on a drop down value (see image below)The table behind the grid is PORTAL_SECDYVW and as you can see from the image below, the PORTAL_AUTHNAME field ...
阅读全文
PeopleCode删除文件的三种方法!
摘要:PeopleCode删除文件的三种方法1. 用GetFile先打开文件,然后用delete()删除文件&MyFile = GetFile(&server_dir | &filename, "U", %FilePath_Absolute);&MyFile.Delete();2. 用Exec函数执行命令rm&ExitCode = Exec("rm " | &am...
阅读全文
巧用MsgGetText
摘要:Lately, I’ve been using the MsgGetText() built-in function to concatenate adhoc strings in PeopleCode. For example, instead of the following:Local string &TEXTLINE = "Value of " | &fld1n...
阅读全文
Message Box
摘要:MessageBox(style, title, message_set, message_num, default_txt [, paramlist])In addition, in the PeopleSoft Pure Internet Architecture the Message Severity dictates how the message displays:If the mes...
阅读全文
Component Interface Tricky
摘要:1. Emplid如果是字母,一定要大写。因为Oracle数据库是区分大小写的。2. Element Assignment by payee 是指从begin date开始,每月计算输入的element的值,直到end date结束。如果只想在某个月修改这个element的值,可以到One time input里面加入一行要更新的element的值,选择action为O,覆盖Element Ass...
阅读全文
Passing Objects
摘要:All PeopleCode objects can be passed as function parameters. You can pass complex data structures between PeopleCode functions (as opposed to passing long lists of fields). If a function is passed an ...
阅读全文
Skip a Search Record Prompt When You Know the Keys
摘要:Here is a worthy tip to take note of. If you are going into a new page and using a search view, yet you already know the keys of that search view, you can use the PeopleCode function SetSearchDialogBe...
阅读全文
Quick way to send emails from PeopleCode
摘要:Here's a quick way to send an email message from within peoplecode. You can also send attachments along with your email message. Simply use the PeopleCode command SendMail to send an email message fro...
阅读全文
Dynamic DropDown Lists
摘要:If you have a drop down list on a page and want to place items into the drop down list dynamically, here is a bit of insight on how to do it. This tip is taken from our discussion forum thread How t...
阅读全文
Difference Between 2 Dates or 2 Times
摘要:There are many occassions where you might want to find the difference in time or days between two dates. Use the PeopleCode function known as DateDiff. The %DateDiff meta-SQL function returns an int...
阅读全文
Calling App Engine from PeopleCode
摘要:There have been many requests from PeopleSoft Pros wanting to call an appengine program from PeopleCode. Some refer to this as "Real-Time Application Engine Processing." For example, when a user save'...
阅读全文
Left Pad Zero Fill
摘要:If you have any specific fields that are lengthy and are left padded with zeroes, you can save your users a lot of time by alowing them to type ONLY the right most numbers. For example, lets say you...
阅读全文
Delete Multiple Files Using PeopleCode
摘要:Deleting files sitting on a server using PeopleCode is one thing I'm sure you will be doing sometime during your PeopleSoft career. The code below should help you out and get you started! /*The path ...
阅读全文
PeopleCode SearchSave Event
摘要:SearchSave PeopleCode is performed after the user clicks the Search button or the Add button on the search page. User SearchSave to validate values entered in the search page fields. Place S...
阅读全文
Hide a Grid Column From a Grid in PeopleCode
摘要:This code should be helpful if you are trying to hide a grid column using PeopleCode To hide a column in a grid (using the Grid and GridColumn objects). You no longer must loop through every row in t...
阅读全文
Delete Grid Blank Rows Entered by Users When Saving
摘要:Sometimes users click the "+" on the grid to enter data but end up clicking it more than once and getting some extra empty rows in the gird. The peopleCode to get rid of any extra empty grid rows when...
阅读全文