Announcements
No record found.
plz somebody help me to resolve this issue ;i need Action includes only View history After rejected status added.
*This post is locked for comments
Hi Codehunter,
After rejecting a workflow, the workflow framework automatically provides this option so that the workflow can be resubmitted after making correction in the workflow document. If you want to stop the worklfow instance, then you may want to invoke the 'Cancel' option on workflow instead of reject.
Thanks,
Baber.
is there no way to hide submit action and leave cancel Visible??
Secondly,After cancelling the workflow,the status doesnt change to Cancel but at the meantime,the workflow status is cancelled and here is the code below::
public void returned(WorkflowElementEventArgs _workflowElementEventArgs)
{
//LedgerJournalTrans LedgerJournalTrans;
LedgerJournalTable ledgerJournalTable;
/*select forupdate ledgerJournalTable
where ledgerJournalTable.JournalNum == LedgerJournalTrans.JournalNum;*/
select forupdate ledgerJournalTable
where ledgerJournalTable.RecId == _workflowElementEventArgs.parmWorkflowContext().parmRecId();
if(ledgerJournalTable.RecId)
ledgerJournalTable.ExpenseApprStatus=ExpenseApproStatus::Rejected;
// LedgerJournalTrans.ExpenseApprStatus = ItemApprStatus::Rejected;
ledgerJournalTable.write();
ledgerJournalTable.update();
// LedgerJournalTrans.update();
}
I didn't get your point. Why do you want to hide the submit option after rejection? I don't know if there is a way to do this. Can you please further elaborate your requirements please?
For your first point, I don't think you can control the visibility of workflow statuses (Submit, Approved, Cancelled, Rejected) based on different action taken on workflow. You really have to explain your requirements very clearly so we can guide you correct way of using built in functionality of workflow.
Have you checked workflow tutorial form is running to capture workflow processes? Workflow status changes after few seconds. Did you see history of the workflow was it really cancelled and there is no error. You could also debug workflow to get more in depth knowledge about workflows.
the cancelled status was resolved but i found that its impossible to hide those Actions(resubmit,cancel) incase of reject status ;Additionally,i need to disable the reviewer to edit the form but allow the approver or next assignee to edit any fields in the form;plz help me on completing all the cycle of Workflow.
thanks
To enable/disable any fields based on next assignee, you need to find the approval or task owner first and then based on that, you can enable/disable the fields on form. Check the example below, same code is written there:
\Forms\CustFreeInvoice\Data Sources\CustInvoiceTable\Methods\active.
Go through the code and let me know if you have any issues.
plz can you post samples of codes per line so i can follow up
Below is the code I was referring to inside active method:
boolean isUserTaskOwner;
boolean isUserApprovalOwner;
if (custInvoiceTable.WorkflowApprovalStatus == CustFreeInvoiceWFApprovalStatus::PendingCompletion)
isUserTaskOwner = custInvoiceTable.isUserTaskOwner();
else if (custInvoiceTable.WorkflowApprovalStatus == CustFreeInvoiceWFApprovalStatus::ChangeRequested)
isUserApprovalOwner = custInvoiceTable.isUserApprovalOwner();
else
isUserTaskOwner = false;
isUserApprovalOwner = false;
isUserTaskOwner and isUserApprovalOwner methods are on CustInvoiceTable and definition is as follows:
public boolean isUserTaskOwner()
return WorkflowWorkItem::isUserTaskOwner(this);
public boolean isUserApprovalOwner()
return WorkflowWorkItem::isUserApprovalOwner(this);
Based on the value of isUserApprovalOwner or isUserTaskOwner, you can enable/disable the editing on datasource as shown below:
CustInvoiceTable_ds.allowEdit(isUserApprovalOwner || isUserTaskOwner);
Please verify and and let me know if you have further queries.
i added that mentioned code above besides i found some codes in Active method;please verify if that code written below correct plus i need to know what line should add enable/disable fields.
int active()
int ret;
if (LedgerJournalTable.ExpenseApprStatus == ExpenseApproStatus::Submitted)
isUserTaskOwner = LedgerJournalTable.isUserTaskOwner();
else if (LedgerJournalTable.ExpenseApprStatus == ExpenseApproStatus::Resubmitted)
isUserApprovalOwner = LedgerJournalTable.isUserApprovalOwner();
element.setAccountAccess();
journalFormTable.datasourceActivePre();
ret = super();
journalFormTable.datasourceActivePost();
element.showProperJournalLinesButton();
element.setLinesGeneratePaymentsLabelAndHelpText();
dimensionDefaultingController.activated();
return ret;
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CP04-islander 34
Michel ROY 14
Jagadabi 6