Hi All,
I need to disable the finished button in project stage if the project have pending transaction for all users except system admin role.
I wrote code in
ProjProjectsListPageInteraction class in setProjectStageAction method to disable the finished option for user except system admin role
SELECT projUnpostedTransView JOIN Name, ProjId, Name FROM projTable
where projUnpostedTransView.ProjId == projTable.ProjId;
if(projUnpostedTransView) // check it have pending trasactions
{
while select firstonly role
exists join userRole where role.RecId == userRole.SecurityRole
&& userRole.User == curUserId()
{
if(role.Name == "System administrator")
this.showButton(ctrlReportedFinish, true);
this.enableButton(ctrlReportedFinish, projTable.Status != ProjStatus::Completed);
if(role.Name != "System administrator")
this.enableButton(ctrlReportedFinish,false);
}
}
But the projUnpostedTransView contain only sub projects id it don't have parent project id.
So for parent project the finished button is not disabled.
How to check the pending transactions for all projects in x++ code.
Thank you.