Showing posts with label PeopleSoft Application Designer. Show all posts
Showing posts with label PeopleSoft Application Designer. Show all posts

How to Access PeopleSoft Browser-Based Shortcuts and App Designer Shortcuts

PeopleSoft applications offer set of keyboard shortcuts to interact with your PeopleSoft application more quickly and easily. These shortcuts are classified into two categories: hot keys and access keys.

To get these shortcuts, Navigate to any PeopleSoft online page and press Shift+Ctrl+K key combo.
You will get a printable list of these shortcuts while online.

Application Designer Keyboard Shortcuts

Some of the most useful PeopleSoft Application Designer Keyboard Shortcuts are mentioned at http://www.peoplesoftwiki.com/application-designer-keyboard-shortcuts

PeopleCode Editor Shortcuts




How to use .Bat File to clear PeopleSoft App Designer Cache in Local Machine

Have you ever noticed a folder in your local system which created by PeopleSoft App Designer to Cache your PeopleSoft database object information?
To give bit of a background, in users local machine PeopleSoft Configuration Manager automatically store database objects in cache files the first time you open a PeopleSoft database object.
They are also downloaded automatically if the master copy of the object on the database server has changed. For each PeopleSoft database to which you connect, the system creates a single child cache files directory to store the cache files for that database.

So where is this cache directory configured?
Open up your PeopleSoft App Designer and on the Menu Click "Go > Configuration"
This will open up the configuration manager, Look at Cache File Directory field and you can see the Directory where your PeopleSoft cache files are stored.

Sometimes you may want to delete these cache files and you can do by clicking Purge Cache Directories.
But, here we will use a windows batch file so that you can use that whenever you want to purge the local directory cache files.
One of the advantages of this methods is you don't want to login to App Designer.
To do that Copy below commands to Notepad and save the file as .bat extension. Then whenever you want to run this file simply double click to run it.
@echo ON
@echo Deleting files from PS CACHE directory...
set DataDir=C:\PS\CACHE 
del /q /s /f %DataDir%
rd /s /q %DataDir%
PS: In this example we assume that your cache directory is C:\PS\CACHE
running this .bat file will delete CACHE directory as well.If a cache file directory is missing (after you delete it), the system automatically rebuilds it the next time that cache files are downloaded.

How to restrict FileTypes (extensions) from URL Object Properties When Adding Attachments Part II

So, as I mentioned in  How to restrict File Types (extensions) from URL Object Properties When Adding Attachments Part I post, I have tested this particular configuration when adding attachments.
The good news is it worked :-)
So, how did it exactly work?
Well, assuming that you have configured a File Extension list and added a list of accepted or rejected file types to that list as per my previous post. Once done you are ready to go and check whether it is working.
As per AddAttachment PeopleCode function, once the file is uploaded you can check the return code which is either an integer or a constant value. Then you can check the return code "21" which is to check the File Extension from the File Extension list that you have configured.

So basically you can try out a code similar to,
/*check the Return code for file extension validation*/
/*Retrun code 21 - "File transfer failed because the file extension is not allowed*/
&RETCODE = AddAttachment("URL.MYTESTRECORD", &ATTACHSYSFILENAME, "", &ATTACHUSERFILE, 0);
   If &RETCODE = 21 Then
      Error MsgGet(12345, 5, "File transfer failed because the file extension is not allowed");
Else
/*Do something*/
End-if;

How to restrict File Types (extensions) from URL Object Properties When Adding Attachments Part I

First of all, I haven't tested this yet but I'm going to pretty soon :-). However, if someone wants to give it a go. Here it is.
You may have already know that, when attaching files using AddAttachement PeopleCode function, sometime we need to restrict certain file types that we don't want end-users to attach to our Peoplesoft system. Normal scenario we think that AddAttachement function will provide this for us. But guess what, even though AddAttachement function has a parameter names FileType, The function will not validate the FileTypes at all. In PeopleBooks it says;


In order to restrict certain file types obviously, we have to do something like this
&RETCODE = AddAttachment("RECORD://SOME_RECORD", &ATTACHSYSFILENAME, "", &ATTACHUSERFILE, 0);

If &RETCODE = 0 Then/* Returns Zero, when user clicks on OK with the valid File Path */
/* Then Check the file extension, if not throw an error msg and delete the file */
If Lower(Right(&ATTACHUSERFILE, 4)) <> ".txt" Then
MessageBox(0,"",0,0,"Your Message",0); /* You can only upload .txt files. */
&RETCODE1 = DeleteAttachment("RECORD://SOME_RECORD", &ATTACHUSERFILE); /* Delete file */
End-If;
But there is another way you can do this
Navigate to PeopleTools, Utilities, Administration, File Extension List page
Here you can set up list of file types, by file extensions which either can accept or reject when you do file attachments to your system. Once you have set up file extension list you have to specify FILE_EXT_LIST property in URL object using the URL maintenance page (PeopleTools, Utilities, Administration, URLs).

"You can restrict the file types that can be uploaded to or downloaded from your PeopleSoft system. The file type restrictions apply to the AddAttachment, DetachAttachment, MAddAttachment, and ViewAttachment functions. Allowable or disallowed file extensions are managed through a file extension list and through the FILE_EXT_LIST property of the URL object."

"This enables you to only upload the appropriate file types at runtime, and reject those file types you think may be suspicious, potentially harmful, or not appropriate for a particular call to a file-processing built-in PeopleCode function"

The most wanted Extension List Types are Inactive and Absolute, If you want to know more about the list types please follow the link http://docs.oracle.com/cd/E57990_01/pt853pbh2/eng/pt/tsvt/task_UsingAdministrationUtilities-07109c.html#ue3f0f90c-23f1-4110-aed1-29af14eff645
Hope this will help for you next implementation of file attachments. feel free to send any comments or suggestions.

How to change Translate values Online

Most of the time, In PeopleSoft translate values for a field is maintained by developers via Application Designer. However, there is a way to maintain the values in the translate table via online as well. Thus, security administrators, power users can now add their own translate values to an application.

To maintain translate values Navigate to PeopleTools > Utilities > Administration > Translate Values


How to enable PeopleCode Auto-Complete feature in App Designer for PeopleTools 8.54

How to enable PeopleCode Auto-Complete feature in App Designer for PeopleTools 8.54
Yes! you heard it correctly!. PeopleTools 8.54 comes with long waiting feature in App Designer, Auto Complete. Lot of IDEs in today's market provide code auto completion feature for any programming language of your choice such as java, C#, php. However, PeopleSoft App Designer lacks this feature until PeopleTools 8.54.
According to PeopleBooks, it says

"The PeopleCode Editor provides an auto-complete feature for PeopleCode application classes, built-in classes, built-in functions, system variables and constants. The auto-complete feature displays the possible options when you insert a period (.) or dot after an object.
The auto-complete feature also supports the display of a tool tip when you hover the mouse over the selected list item. The tool tip displays the method name, parameter type, and the return type.
The auto-complete feature is not applicable for objects that are declared as automatic variable and objects that get resolved at run-time."

How to setup Auto-Complete Feature

"To use the auto-complete feature, you must enable the Auto-completion for PeopleCode option on the Editors tab of the Options dialog box."
This example illustrates the fields for the auto-complete feature.
Options page - PeopleCode Editor group box
for more info visit;

PeopleSoft Application Designer Practices

This is pretty good and very informative resource who are newbies to PeopleSoft and want to learn PeopleSoft Application Designer which is the main development tool used to build and modify PeopleSoft applications. This presentation describes main (nine) steps for creating a PeopleSoft application. This presentation is done by Yes-V Software Solutions.
This will walk through step by step of how to create PeopleSoft Application Designer definitions, including:
•    Fields
•    Records (Tables)
•    Pages
•    Components
•    Menus

you can find the link here;
http://www.scribd.com/doc/29693050/PeopleSoft-Application-Designer-Practice