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

Workflow for new vendor

(0) ShareShare
ReportReport
Posted on by 570

Hi All,

My task create the workflow for vendor creation, I use below link to completed my task 

https://community.dynamics.com/365/financeandoperations/b/nareshsdynamicsaxblog/posts/create-custom-workflow-in-d365-dynamics-365?pifragment-92857=2

For  exciting vendor is showing workflow please check below images .

/8473.v1.PNG/

Am facing issues :

While creating new vendor workflow was not triggering please check below images.

/new-vendor.PNG/

I have the same question (0)
  • kvnkk Profile Picture
    800 on at

    Can you cross check workflow status for newly created record --this.WorkflowStatus == WorkflowStatus::NotSubmitted(this should be match with your newly created record.

    newly record status should match with condition written under this method "canSubmitToWorkflow". If the method return false the workflow will not show for the record

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Tony,

    Why do you want to code this?

    A new vendor creation workflow can be created out of the box with the help of the PowerPlatform.

    I cannot see the necessity for a system modification.

    Would thus recommend that you have a look at the PowerPlatform and integrations with D365FO.

    Best regards,

    Ludwig

  • TonyAx Profile Picture
    570 on at

    Thank for reply Kvnkk

    Please check my code .

    Can-submit.PNG

  • Verified answer
    kvnkk Profile Picture
    800 on at

    Can you share me the code in below method :-

    public boolean canSubmitToWorkflow(str _workflowType = '') and also workflow status of newly created record

    Above method available under table methods

  • TonyAx Profile Picture
    570 on at

    I Try to create new  method  on Vendtable  name as canSubmitToWorkflow .like blow its showing error there is no method name as canSubmitToWorkflow  on vendtable ,then how I can use Coc for this.

    please give some idea to resolve this.

    [ExtensionOf(tableStr(VendTable))]

    final class VendTableMy_Extension

    {

    public boolean canSubmitToWorkflow(str _workflowType = '')

      {

           boolean ret;

    ret = super(_workflowType);

    if (this.WorkflowStatus == WorkflowStatus::NotSubmitted)

    {

    ret = boolean::true;

    }

    else

    {

    ret = boolean::false;

    }

    return ret;

    }

    }

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Tony,

    Have you been able to get this issue fixed?

    Still, ... I don't think that a single line of code is required to achieve what you are looking for and would suggest that you have a look at the PowerPlatform to realize such requirements in the future.

    Best regards,

    Ludwig

  • TonyAx Profile Picture
    570 on at

    Hi All,

    Thank you KVNKK, Problem Resolved.

  • AnkurBh Profile Picture
    107 on at
    Can you please elaborate on how did you resolved the error. I created COC for canSubmitToWorkflow, but it did not worked

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 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans