web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

(0) ShareShare
ReportReport
Posted on by

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,

I have the same question (0)
  • Verified answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    This method needs to have a parameter str _workflowType. You can notice it if you try to override this method in any of your own tables.

    Here's also an example from Microsoft how to handle canSubmitToWorkflow with Chain of Command: docs.microsoft.com/.../method-wrapping-coc

  • VoltesDev Profile Picture
    on at

    Hi Nikolaos,

    Yes, I forgot about this. Thanks.

  • VoltesDev Profile Picture
    on at

    Hi Nikolaos,

    I'm sorry, one quick question (because I'm not sure create new topic will make sense). in all documents saying we need to create another method for update the workflow state.

    So this new method also through CoC ? a bit confuse because my understanding CoC is we need to have the the original first right ? so this Update Workflow state, is new method or actually every table already have it ?

    I'm following this reference:

    community.dynamics.com/.../create-custom-workflow-in-d365-dynamics-365

    Thanks,

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    You can easily find out if every table has this method. Just create a new table, then right click methods -> override method and look if you see it there.

  • Blue Wang Profile Picture
    on at

    Hi Voltes,

    Generally, you only need to implement this method at the table level. After you create the workflow type, the wizard will help you create the eventhandler class and use it there.

    In addition, I checked the documentation and found no mention of the need to create another (maybe I missed it).

  • VoltesDev Profile Picture
    on at

    Hi,

    Yes, If I tried to refer to my custom table, there is no such method for Update Workflow Status. So it means I will need to create this new method, right ? and it is not CoC because it is not override anything.

    And yes, in this 2 reference are talking about the needs to create this method :

    devmusings.blog/.../

    community.dynamics.com/.../create-custom-workflow-in-d365-dynamics-

    But then again my Sales Table extension, how to create new method over there ? I'm creating this on Fleet Management, btw. SalesTable is extended here.

    Thanks

  • Blue Wang Profile Picture
    on at

    hi Voltes,

    In D365FO extension of canSubmitToWorkflow still not available if not override on actual table. But there is an alternate on which i have recently and its working perfectly on client side.

    Check this thread:https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/256336/override-table-methods-in-d365

  • VoltesDev Profile Picture
    on at

    Hi Blue,

    Sorry to confuse you, canSubmitToWorkflow is solved already. I explain already on my previous discussion, understand I need to create new topic but I feel this still related.

    It is about the next method which is UpdateWorkflowState.

    Thanks,

  • Blue Wang Profile Picture
    on at

    Add new method to table extension.

  • VoltesDev Profile Picture
    on at

    Yes,

    I know, that's what I'm trying to do. but how ? The SalesTable extension, no menu to create new method.

    Thanks.

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans