web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • VoltesDev Profile Picture
    on at
    RE: canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

    Ok,

    Now I understand. I'm just learning CoC as well, actually. And usually people tense the CoC for the "Next" statement, which like super(), that's why I'm asking Nikolaos, for this method, do we use CoC as well ? because there is no original method.

    Ok, so I can close this topic.

    Many thanks.

  • Verified answer
    Blue Wang Profile Picture
    on at
    RE: canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

    Hi Voltes,

    You already mentioned that you use CoC, you can create a new method.

    docs.microsoft.com/.../add-method-table

  • VoltesDev Profile Picture
    on at
    RE: canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

    Yes,

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

    Thanks.

  • Blue Wang Profile Picture
    on at
    RE: canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

    Add new method to table extension.

  • VoltesDev Profile Picture
    on at
    RE: canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

    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
    RE: canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

    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
    RE: canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

    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
    RE: canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

    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).

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

    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.

  • VoltesDev Profile Picture
    on at
    RE: canSubmitToWorkflow from SalesTable : The augmented class 'SalesTable' provides a method by this name

    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,

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,239

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 604 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans