The code given below for each of the customization has to be placed in the path mentioned.
1) To build tree structure for the policies in a given trigger point
Path: EOCF_CLF_RB:UI:ManageTriggerPoint
Method: ManageTriggerPoint
Code:
/*Smart ERP Customization Begin*/
If %Component = "SM_DF_MANAGE_TP" Then
&iPageName = Page.SM_DF_MANAGE_TP;
End-If;
/*Smart ERP Customization End*/
2) To access term value even with the spaces in it
Path: EOCF_CLF_DL:Contexts:CtxVarTerm
Property: get isString
Code:
/*SmartERP Customization Begin*/
/* Alpha numeric is returning false for the string that has spaces, so commenting IsAlphaNumeric and returning false*/
Return True;
rem Return IsAlphaNumeric(%This.CtxTermOverrideValue);
/*SmartERP Customization End*/
3) To add the property “Context Variable” in the results structure for identifying or for processing all types of the context variables
Path: EOCF_CLF_DL:Runtime:Results:DataLibraryResultStructure
Added property “DataLibraryResultStructure” in the interface.
Code1:
/* SmartERP Customization Begin*/
import EOCF_CLF_DL:Contexts:ContextVariable;
/* SmartERP Customization End */
Code2:
/* SmartERP Customization Begin */
property EOCF_CLF_DL:Contexts:ContextVariable objContextVariable;
/* SmartERP Customization End */
4) To retrieve the context variable for all the term types like Rowset, Record, Field
Path: EOCF_CLF_DL: Runtime: AccessMethods:AccessMethodCtxVar
Method: Process
Code1:
/* SmartERP Customization Begin*/
&oResults.objContextVariable = &oCtxVar;
/* SmartERP Customization End */
Code2: /* SmartERP Customization Begin*/
&oResults.objContextVariable = &oCtxVar;
/* SmartERP Customization End */
Code3:
/* SmartERP Customization Begin*/
&oResults.objContextVariable = &oCtxVar;
/* SmartERP Customization End */
5) To access the property ContextVariable as Field
Path: EOCF_CLF_DL:Runtime:Results: ResultsField
Method: ResultsField
Code1:
/* SmartERP Customization Begin*/
import EOCF_CLF_DL:Contexts:ContextVariable;
/* SmartERP Customization End*/
Code2: Class ResultsField
/* SmartERP Customization Begin */
property EOCF_CLF_DL:Contexts:ContextVariable objContextVariable;
/* SmartERP Customization End */
Code3:
Method: ResultsField
/* SmartERP Customization Begin*/
%This.objContextVariable = Null;
/* SmartERP Customization End */
6) To access the property ContextVariable as Record
Path: EOCF_CLF_DL:Runtime:Results:ResultsRecord
Code1:
/* SmartERP Customization Begin */
import EOCF_CLF_DL:Contexts:ContextVariable;
/* SmartERP Customization End*/
Code2: Class ResultsRecord
/* SmartERP Customization Begin */
property EOCF_CLF_DL:Contexts:ContextVariable objContextVariable;
/* SmartERP Customization End */
Code3:Method ResultsRecord
/* SmartERP Customization Begin */
%This.objContextVariable = Null;
/* SmartERP Customization End */
7) To access the property ContextVariable as Rowset
Path: EOCF_CLF_DL:Runtime:Results:ResultsRowset
Method: ResultRowset
Code1:
/* SmartERP Customization Begin */
import EOCF_CLF_DL:Contexts:ContextVariable;
/* SmartERP Customization End */
Code2:Class ResultsRowset
/* SmartERP Customization Begin */
property EOCF_CLF_DL:Contexts:ContextVariable objContextVariable;
/* SmartERP Customization End */
Code3:Method ResultsRowset
/* SmartERP Customization Begin*/
%This.objContextVariable = Null;
/* SmartERP Customization End */
8) To access the buffer rows irrespective of the buffer change
Path: EOCF_CLF_DL:Contexts:CtxVarCBuffer
Method: addRowsToCollection
Code:
/*SmartERP Customization Begin*/
%This.CollectionRows.Push(&rw1);
&iCount = &iCount + 1;
/*SmartERP Customization End*/
/*SmartERP Customization Begin*/
/*If &rw1.IsNew And
Not &rw1.IsChanged Then
Else
%This.CollectionRows.Push(&rw1);
&iCount = &iCount + 1;
End-If;*/
/*SmartERP Customization End*/
9) To retrieve scroll path for the online component access the property ContextVariable as Rowset
Path: EOCF_CLF_DL:Utility: ScrollPath
Method: ScrollPath
Code1:
/*SmartERP Customization Begin */
try
/*SmartERP Customization Ends */
Code2:
/*SmartERP Customization Begin */
catch Exception &e
end-try;
/*SmartERP Customization -- Ends */
10) To restrict the workflow error the following code should be commented
Path: EOCF_CLF_DE.LibraryTerm
Method: eval
Code:
rem remove the explicit binds from the context;
/*SmartERP customization starts -- Commented the following code to restrict the workflow error*/
<* /*START BUG 12652479*/
/*This fix retains the context variable values if the Context used is Generic and the cache option is Global*/
Local string &Clause = "WHERE EOCF_LIB_TERM_ID = :1";
&rsTermctx.Fill(&Clause, &ID);
If &rsTermctx(1).EOCF_TERM_CTX.EOCF_CONTEXT_ID.Value = 1 Then
If &rsTermctx(1).EOCF_TERM_CTX.EOCF_CACHE_OPT.Value <> "G" Then
&context.clearCtxVariableOverrides();
End-If;
Else
&context.clearCtxVariableOverrides();
End-If;
/*END BUG 12652479*/*>
/*SmartERP customization ends -- Commented the following code to restrict the workflow error*/
rem done;
11) Start page customization in the record field
This will avoid the errors caused by the invalid characters being assigned/converted after passing the URL text.
Copy the below code snippet in record field WEBLIB_PTBR.ISCRIPT1.FieldFormula in the Function IScript_StartPage.
/* SmartERP Customization Start */
If ((%OperatorId = "INVITEE" Or
%OperatorId = "REGISTER") And
%Portal = "SMART")
Then
Local string &sURLParams = %Request.QueryString;
Local array of string &tokens = Split(&sURLParams, "URL=");
Local integer &i;
If &tokens.Len = 2 Then
rem %Response.RedirectURL(Unencode(&tokens [2]) | "&httpredirect=true");
%Response.RedirectURL(Unencode(&tokens [2]));
Return;
End-If;
End-If;
/* SmartERP Customization End */
12) HR Customizations
i) The following customization is needed to avoid issues during CI push for future dated transactions:
Remove EFFDT condition with %CurrentDateIn
ii) Add the code in the below given record fields to bypass the execution of the following PeopleSoft code while CI push.
a) STATE_TAX_DATA.RESIDENT.FieldFormula
If /***** SmartERP Customization - Start *****/(
/***** SmartERP Customization - End *****/
%Menu = MenuName."MAINTAIN_PAYROLL_DATA_(USF)" Or
%Menu = MenuName."MAINTAIN_PAYROLL_DATA_US" Or
%Menu = MenuName."MAINTAIN_PAYROLL_INTERFACE" /***** SmartERP Customization - Start *****/) And
Not Substring(%CompIntfcName, 1, 6) = "SM_OB_"
/***** SmartERP Customization - End *****/
Then
b) STATE_TAX_DATA.UI_JURISDICTION.FieldFormula
If /***** SmartERP Customization - Start *****/(
/***** SmartERP Customization - End *****/
%Menu = MenuName."MAINTAIN_PAYROLL_DATA_(USF)" Or
%Menu = MenuName."MAINTAIN_PAYROLL_DATA_US" Or
%Menu = MenuName."MAINTAIN_PAYROLL_INTERFACE" /***** SmartERP Customization - Start *****/) And
Not Substring(%CompIntfcName, 1, 6) = "SM_OB_"
/***** SmartERP Customization - End *****/
Then
c) PY_IC_W4_FTX_VW.EMPLID.SaveEdit
/*SmartERP Customization begin */
If Not Substring(%CompIntfcName, 1, 6) = "SM_OB_" Then
If &FedW4.Form2020_Available Then
If PY_IC_W4_WRK.CURRENT_YEAR < Year(&FedW4.Form2020_Effdt) Then
Error MsgGetText(2001, 1328, "Year is not valid for 2020 W-4 Form.", PY_IC_W4_WRK.CURRENT_YEAR);
End-If;
End-If;
If Not &FedW4.Form2020_Available Then
If PY_IC_W4_FTX_VW.SPECIAL_FWT_STATUS = "A" And
PY_IC_W4_FTX_VW.FORM_1078_RECD = "N" And
PY_IC_W4_FTX_VW.NRA_EXEMPT_WHRULE <> "R" And
PY_IC_W4_FTX_VW.FWT_MAR_STATUS = "M" And
PY_IC_W4_FTX_VW.MARRIED_FILE_SINGL = "N" Then
Error MsgGet(1500, 584, "Select single status for Nonresident Alien employees");
End-If;
End-If;
End-If;
/*SmartERP Customization End */
d) PY_IC_W4_FTX_VW.EMPLID.SaveEdit
/*SmartERP Customization begin */
If Not Substring(%CompIntfcName, 1, 6) = "SM_OB_" Then
If &FedW4.Form2020_Available Then
UpdateValue(FED_TAX_DATA.FWT_TTL_DEP_AMT, 1, PY_IC_W4_WRK.FWT_TTL_DEP_INT);
UpdateValue(FED_TAX_DATA.FWT_OTH_INCOME, 1, PY_IC_W4_WRK.FWT_OTH_INC_INT);
UpdateValue(FED_TAX_DATA.FWT_DED_ADJ, 1, PY_IC_W4_WRK.FWT_DED_ADJ_INT);
UpdateValue(FED_TAX_DATA.FWT_ADDL_AMT, 1, PY_IC_W4_WRK.FWT_ADDL_AMT_INT);
UpdateValue(FED_TAX_DATA.FWT_ALLOWANCES, 1, 0);
UpdateValue(FED_TAX_DATA.MARRIED_FILE_SINGL, 1, "N");
&FormVersion = "B";
Else
&FormVersion = "A";
End-If;
End-If;
/*SmartERP Customization End */
iii) Add the code in the following record field to restrict selecting only one Work State for UI Jurisdiction.
/* If more than 1 state has been assigned UI Jurisdiction, error */
If %CompIntfcName = "CI_TAX_DATA" /***** SmartERP Customization - Start *****/ Or
Substring(%CompIntfcName, 1, 6) = "SM_OB_"
/***** SmartERP Customization - End *****/
Then
13) Customization specific to PeopleTools 8.55 and below
This will avoid the errors caused by the special characters in field values while updating the value into the target component.
Class Name: EOCF_CLF_DL:Runtime:Results:ResultsScalar
Method Name: getResultValue
Before Customization:
Adjust the logic as below: