Hi guys,
Face some difficulties while creating method CanSubmitToWorkflow in SalesTable. I did some research and it looks many confusion also.
So 1st problem is, we can no more override the method, right ? so while the reference I have, all was mentioned about that, this step is out of options.
2nd, I thought we can solve this by using CoC to extend the table (The sales table it self already extend, and I'm using Fleet Management Model, btw). But I'm facing Build error saying like this :
My CoC class:
[ExtensionOf(tableStr(SalesTable))]
final class FMSalesTableCanSubmitToWorflow_Extension
{
public boolean canSubmitToWorkflow()
{
boolean ret;
ret = next canSubmitToWorkflow();
if(this.recID && this.WorkflowStatus == CFMJOurnalWorkflowStatus::NotSubmitted && this.existSalesLine())
{
ret = true;
}
return ret;
}
}
and the error :
The augmented class 'SalesTable' provides a method by this name, but this method cannot be used as a chain of command method since the parameter profile does not match the original method.
What does it mean actually ? Need to understand this first, before I tried out another solution I found, and this guy create Event Handler instead.
https://community.dynamics.com/365/sales/f/dynamics-365-for-sales-forum/307099/cansubmittoworkflow-method-of-custom-table-joined-with-salestable-not-working-in-salesorder-workflow-d365
Thanks,