Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Friday, November 24, 2023

Auto submit of any process to Workflow in D365 / X++

 Hi,


        try
        {
            ttsbegin;
                        
            Workflow::activateFromWorkflowType( workFlowTypeStr( "workFlowTypeName"),  TableName.RecId, "Auto submitted by action Alfa", NoYes::No);
            
            ttscommit;
        }
        catch(exception::Error)
        {
            throw Error("Not submitted");
        }

///             _workflowCorrelationId = Workflow::activateFromWorkflowType( _workflowTypeName, _recId, "Comments", NoYes::No);
             

             IssueStateChangeManager::submit(TableBuffer);


Regards,

No comments:

Post a Comment

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...