Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to choose multi line and can run workflow

(1) ShareShare
ReportReport
Posted on by
 
Hi all experts,
I have a request: choose multi line and run workflow,
Currently if i choose more than 1 the workflow button is dimmed.
Anyone with experience please support me.
Thanks !
  • Suggested answer
    Sufian.Ahmad Profile Picture
    Sufian.Ahmad 6 on at
    How to choose multi line and can run workflow
    Lets assume you need to add this feature on "All purchase orders" form, steps are mentioned below 
    1. Add new button on PurchTableListPage form.
    2. On button's "OnClicked" event handler, write below mentioned code.
     
    RecId                   selectRecId;
    PurchTable		purchTable;
    
    //Multiple selection
    
    for(selectRecId = purchtable_ds.getFirst(true).RecId;selectRecId;selectRecId=purchtable_ds.getNext().RecId)
    {
    	comment = strFmt("Workflow submission comment for Purchase order %1",purchTable.PurchId);
    
    	purchTable = PurchTable::findRecId(selectRecId, true);
    	ttsbegin;
    	purchTable.submitToWorkflow(workflowTypeStr(PurchTableTemplate), comment, false);
    	ttscommit;
    }
     Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Raj Borad Profile Picture
    Raj Borad 491 on at
    How to choose multi line and can run workflow
    Please move it to Finance forum, it's looks like of F&O, not of AX 2012.
     

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans