尝试在页面 PeopleCode 事件上调用函数时出现 PeopleCode 错误
PeopleCode error while trying to call function on Page PeopleCode event
我正在尝试将以下函数 (populate_details) 添加到 Page PeopleCode Activate 事件。代码的顶部已经存在,我试图添加从 6/24/20 评论开始的部分并收到错误“语法错误:期待语句。(2,42)^ HCSC”如果我删除顶部的部分代码然后错误不显示并且正确保存,所以我一定有某种语法错误。感谢您的帮助!
import HR_DIRECT_REPORTS:EmployeeSelection;
Component HR_DIRECT_REPORTS:EmployeeSelection &MyUI;
&MyUI.PageActivate();
/*GHS KLG - link to Footprints on termination screen*/
If DERIVED_HR_DR.HR_DR_PAGE_TITLE.Value = "Terminate Employee" Then
GHS_MSS_WRK.HTMLAREA.Value = MsgGetExplainText(31000, 27, "Message not found.");
GHS_MSS_WRK.HTMLAREA.Visible = True;
Else
GHS_MSS_WRK.HTMLAREA.Visible = False;
End-If;
/*GHS end*/
/* GHS KDR 6/24/20 BEGIN */
Declare Function populate_details PeopleCode GH_PERS_INF_WRK.FUNCLIB FieldFormula;
GH_PERS_INF_WRK.EFFDT = %Date;
populate_details(%Date, PERSON_NPC_VW.EMPLID.Value, GH_PERS_SRCH_CW.EMPL_RCD.Value);
/* GHS KDR 6/24/20 END */
您必须在 Page PeopleCode Activate 事件的顶部声明您的 populate_details
函数。紧接着这一行应该工作:
Component HR_DIRECT_REPORTS:EmployeeSelection &MyUI;
然后你就可以像以前那样调用你的函数了,剩下的代码看起来没问题。
我正在尝试将以下函数 (populate_details) 添加到 Page PeopleCode Activate 事件。代码的顶部已经存在,我试图添加从 6/24/20 评论开始的部分并收到错误“语法错误:期待语句。(2,42)^ HCSC”如果我删除顶部的部分代码然后错误不显示并且正确保存,所以我一定有某种语法错误。感谢您的帮助!
import HR_DIRECT_REPORTS:EmployeeSelection;
Component HR_DIRECT_REPORTS:EmployeeSelection &MyUI;
&MyUI.PageActivate();
/*GHS KLG - link to Footprints on termination screen*/
If DERIVED_HR_DR.HR_DR_PAGE_TITLE.Value = "Terminate Employee" Then
GHS_MSS_WRK.HTMLAREA.Value = MsgGetExplainText(31000, 27, "Message not found.");
GHS_MSS_WRK.HTMLAREA.Visible = True;
Else
GHS_MSS_WRK.HTMLAREA.Visible = False;
End-If;
/*GHS end*/
/* GHS KDR 6/24/20 BEGIN */
Declare Function populate_details PeopleCode GH_PERS_INF_WRK.FUNCLIB FieldFormula;
GH_PERS_INF_WRK.EFFDT = %Date;
populate_details(%Date, PERSON_NPC_VW.EMPLID.Value, GH_PERS_SRCH_CW.EMPL_RCD.Value);
/* GHS KDR 6/24/20 END */
您必须在 Page PeopleCode Activate 事件的顶部声明您的 populate_details
函数。紧接着这一行应该工作:
Component HR_DIRECT_REPORTS:EmployeeSelection &MyUI;
然后你就可以像以前那样调用你的函数了,剩下的代码看起来没问题。