Tuesday, 13 September 2016

Workflow Code for User Recommended by

   if(_Release.PGrpApplicable == NoYes::Yes)
    {
        select  workflowtrackingstatustable
                        where workflowtrackingstatustable .ContextRecId == _Release.RecId
                        &&    workflowtrackingstatustable.ContextTableId == _Release.tableid;

        select workflowtrackingtable where  workflowtrackingtable.WorkflowTrackingStatusTable == workflowtrackingstatustable.Recid
                                         && workflowtrackingtable.Name == Parameters.Level1//'Step 1'
                                         && workflowtrackingtable.TrackingType == WorkflowTrackingType::Completion;

            // ITLTLIndentReportTmp.ElementId = workflowtrackingtable.ElementId;

             select workflowtrackingtableINS where workflowtrackingtableINS.ElementId == workflowtrackingtable.ElementId
                                               // && workflowtrackingtableINS.WorkflowStepTable == workflowtrackingtable.WorkflowStepTable
                                                && workflowtrackingtableINS.TrackingContext == workflowtrackingcontext::WorkItem
                                                && workflowtrackingtableINS.TrackingType  == WorkflowTrackingType::Approval
                                                //&& workflowtrackingtableINS.WorkflowElementTable  == workflowtrackingtable.WorkflowElementTable
                                                && workflowtrackingtableINS.WorkflowTrackingStatusTable == workflowtrackingstatustable.RecId;



                      if(workflowtrackingtableINS)
                  {
                             ReleaseTemp.CreatredBy2   =  dirPartyTable::findRec(DirPersonUser::find(workflowtrackingtableINS.User).PersonParty).Name;
                             ReleaseTemp.ReceiptDate1  = any2date(workflowtrackingtableINS.createdDateTime);
                  }


    }

No comments:

Post a Comment

POSTMAN D365

  Postman is useful to test the behavior of different OData class from/to D365FO. In this post we will see the steps to setup Postman with D...