Translate

Thursday, 7 February 2013

Component Properties: Difference between Search Record and Add Search Record

Search Record Name
 Displays the component's default search record when you access the component in update or display mode.

Note. You can assign an override search record to a component at the menu level. If the component uses an override search record, the search record displayed in the Override Search Record will be different from this one and you should search it instead.

Add Search
 Displays the component's search record when you access the component in add mode

Approval work flow engine

   Purchase requisitions, training requests, and employee transfers are some of the many enterprise transactions that require approval. Some transactions, such as training requests, may require a single-level manager or supervisor approval; other  transactions may use complex routing rules to determine the approval path. For example, a purchase requisition for an item costing $10,000 or less may require no
more than a manager’s signature, whereas a purchase requisition for a single item costing $100,000 or more may require a senior vice president’s approval.
Prior to electronic workflow systems, the approval process consisted of signed forms routed from one approver to the next.
      Prior to PeopleTools 8.48 and PeopleSoft 9.0, PeopleSoft applications used a PeopleTools approval framework called Virtual Approver. In PeopleTools 8.48, PeopleSoft introduced the Approval Workflow Engine (AWE).
            The main intention behind the introduction of Approval Workflow Engine was to reduce the amount of coding required to configure Approval Workflows / Routing thus enabling the functional users to configure the workflow themselves once the initial development was done by a developer. This goes inline with the fact that Fusion also would be mostly configurable, thus reducing the maintenance cost. All of the steps in approval workflow are defined using PeopleSoft pages and not PeopleCode. Therefore, functional users can design and maintain workflows using these online PeopleSoft pages instead of requiring technical developers to create workflow rules.

Navigation :In HCM, the menu navigation for AWE is under Set Up HRMS | Common Definitions | Approvals. 

Tuesday, 29 January 2013

How to go main page from secondary page using DoModal and EndModal functions

  • Insert bushbutton in main page destination :peoplecode,record :recname, fieldname: fldname(ex:code)
    write peoplecode domodal code in  code field fieldchange event
  • DoModal(Page.SP_SEC_PNL, "SAMPLE 2NDARY PAGE ", 111, 111);
  • Domodal:Use the DoModal function to display a secondary page. Secondary pages are modal, meaning that the user must dismiss the secondary page before continuing work in the page from which the secondary page was called.
     Note:Domodel can display only single page. to display entire component use DoModelcomponent.
  • In secondary page if you dont have any ok or cancel button use push button in secondary page write code Endmodal (1) in field change event.
     


EndModal(returnvalue):

Use the EndModal function to close a currently open secondary page. It is required only for secondary pages
that do not have OK and Cancel buttons. If the secondary page has OK and Cancel buttons, then the function
for exiting the page is built in and no PeopleCode is required.

The following statement acts as an OK button:.
EndModal(1);
The following statement acts as a Cancel button:
EndModal(0);

Monday, 28 January 2013

Changing default SETID for a business unit

First up, how to associate a SETID with a Business Unit in PeopleSoft?
It's a one time activity done while creating a Business Unit. However SETIDs cannot be changed as easily as one would think after the creation of a Business Unit

Business Units(BU) are created and maintained in the navigation: Set Up HRMS -> Foundation Tables -> Organization -> Business Unit

In this BU page, under 'Default Record Group Setids' either a new SETID can be entered or SETIDs setup can be cloned from an existing Business Unit.











Until an option is chosen, only one field is editable and other is disabled. If the cursor is positioned to 'SETID' then 'Clone from Existing Business Unit' is disabled and vice-versa.
Once an option is chosen and saved, both the options get grayed out and one cannot modify this default SETID. So how to change the SETIDs once a Business Unit is setup and associated with a different SETID?

There are two ways to change the SETIDs for a Business Unit:
1) Conventional - PIA method:
Navigate to PeopleTools -> Utilities -> Administration -> TableSet Control
Type in the setcontrol value in the search page.
Change the default setid to a required new SETID. Doing this would associate the new SETID for all the Record groups for that BU. If you need to change the SETID only for a few Record Groups then change the setids for each record group instead of changing the default SETID.


2) Backend(database update) method:
Default setid in the below table's has to be updated to replace the PeopleSoft delivered default setid.

  • PS_SET_CNTRL_TBL
  • PS_SET_CNTRL_GROUP
  • PS_SET_CNTRL_REC
  • and the Record group table
Record group table can be PS_REG_REGION_TBL, PS_LOCATION_TBL, PS_DEPT_TBL and so on. If you need to change the SETID for a Region from 'ABC' to 'XYZ' then update the above three tables and PS_REG_REGION_TBL.

Friday, 25 January 2013

Dosave V/S Dosave now

Dosave() : Use the DoSave function to save the current page. DoSave defers processing to the end of the current
PeopleCode program event, as distinct from DoSaveNow, which causes save processing (including SaveEdit,
SavePreChange, SavePostChange, and Workflow PeopleCode) to be executed immediately.


DoSave can be used only in FieldEdit, FieldChange, or MenuItemSelected PeopleCode.

The following example sets up a key list with AddKeyListItem, saves the current page, and then transfers the
user to a page named PAGE_2.
ClearKeyListItem( );
AddKeyListItem(OPRID, OPRID);
AddKeyListItem(REQUEST_ID, REQUEST_ID);
SetNextPage("PAGE_2");
DoSave( );
TransferPage( );

Dosavenow():DoSaveNow causes the current page to be saved immediately. Save processing (including SaveEdit,SavePreChange, SavePostChange, and Workflow PeopleCode) is executed before continuing execution of the program where DoSaveNow is called. DoSaveNow differs from the DoSave function in that DoSave defers saving the component until after any running PeopleCode is completed.

DoSaveNow can only be called from a FieldEdit or FieldChange event

The following example calls DoSaveNow to save the component prior to running a remote process in the
remote_depletion declared function:
Declare Function remote_depletion PeopleCode FUNCLIB_ININTFC.RUN_DEPLETION Field⇒
Formula;
/*
Express Issue Page - run Depletion job through RemoteCall()
*/
If %Component = COMPONENT.EXPRESS_ISSUE_INV Then
DoSaveNow();
&BUSINESS_UNIT = FetchValue(SHIP_HDR_INV.BUSINESS_UNIT, 1);
&SHIP_OPTION = "S";
&SHIP_ID = FetchValue(SHIP_HDR_INV.SHIP_ID, 1);
remote_depletion(&BUSINESS_UNIT, &SHIP_OPTION, &SHIP_ID, &PROGRAM_STATUS);
End-If

how to send mail using peoplecode

It is not possible to send HTML embedded emails using PeopleSoft standard Workflow Technologies. However it is possible to send HTML embedded emails using SENDMAIL function.

All About SENDMAIL function:
Below is what is specified in PeopleBooks on SENDMAIL function. After the end of the transcript on SENDMAIL function.

Example
The following example sets up several variables that are then used to construct an email message that
includes two attachments:
&MAIL_FLAGS = 0;
&MAIL_TO = "jagruthi@peoplesoft.com;surya@peoplesoft.com";
&MAIL_CC = "";
&MAIL_BCC = "mom@aol.com";
&MAIL_SUBJECT = "Live long and prosper!";
&MAIL_TEXT = "Please read my attached CV. You will be amazed and hire me⇒
forthwith.";
&MAIL_FILES = "c:\mydocs\resume.doc;c:\mydocs\coverlet.doc";
&MAIL_TITLES = "My CV;READ ME";
&MAIL_SENDER = "MyEmail@Yahoo.com";
&RET = SendMail(&MAIL_FLAGS, &MAIL_TO, &MAIL_CC, &MAIL_BCC, &MAIL_SUBJECT, &MAIL_⇒
TEXT, &MAIL_FILES, &MAIL_TITLES, &MAIL_SENDER);
if not (&RET = 0) then
WinMessage("Return status from mail = " | &RET);
end-if;

Thursday, 24 January 2013

How to Disable a PeopleSoft Workflow Event?

Method#1 - The Application Designer Way:
In Application designer, we can Open and turn off the Active check box for each Activity, in event definition
 .

Method#2 - The PIA way:
Navigate to PeopleTools -> Workflow -> Defaults and Messages -> Set Workflow Defaults
Then uncheck the worklist and email boxes. However, this will disable all the workflows rather than just one particular event or required event(s).