First Form |
Second Form |
For First form follow below steps:
Steps:
1. Navigate to Classes\LedgerJournalFormTable\enableButtonActive and write below code.
UserGroupInfo userGroupInfo;
UserGroupList userGroupList;
boolean postButtonEnable;
2. Now Add postButtonEnable in IF ELSE Condition which is shown in BOLD FONTS and Highlighted with yellow background color.
select name from userGroupInfo
where userGroupInfo.name =='Post Group'
join groupId,RecId,UserId from userGroupList
where userGroupList.groupId == userGroupInfo.name
&& userGroupList.userId == curUserId();
if (userGroupList.RecId)
{
postButtonEnable = true;
}
else
{
postButtonEnable = false;
}
if (ctrlPostJournalMenu)
{
if (!this.journalTable_DS().anyMarked())
{
if (ledgerJournalTable.isInWFApprovalProcess())
{
// The journal is in workflow approvals.
ctrlPostJournalMenu.enabled(enabled && !ledgerJournalTable.Posted && ledgerJournalTable.isWFApprovalApproved());
}
else
{
// The is not in workflow approvals.
ctrlPostJournalMenu.enabled(enabled && !ledgerJournalTable.Posted && ledgerJournalTable.approved() && postButtonEnable);
}
}
For Second form follow below steps:
Steps:
1. Navigate to Classes\LedgerJournalFormTrans\setPostMenuButtonEnabled and write below code.
UserGroupInfo userGroupInfo;
UserGroupList userGroupList;
boolean postButtonEnable;
2. Now Add postButtonEnable in IF ELSE Condition which is shown in BOLD FONTS and Highlighted with yellow background color.
select name from userGroupInfo
where userGroupInfo.name =='Post Group'
join groupId,RecId,UserId from userGroupList
where userGroupList.groupId == userGroupInfo.name
&& userGroupList.userId == curUserId();
if (userGroupList.RecId)
{
postButtonEnable = true;
}
else
{
postButtonEnable = false;
}
if (ctrlPostJournalMenu)
{
enabled = this.isJournalEnabled();
if (ledgerJournalTable.isInWFApprovalProcess())
{
enabled = enabled && ledgerJournalTable.isWFApprovalApproved();
}
else
{
enabled = enabled && ledgerJournalEngine.approved() && postButtonEnable ;
}
ctrlPostJournalMenu.enabled(enabled);
}
No comments:
Post a Comment