Skip to main content

Posts

Showing posts with the label purchtable

Code to get Miscellaneous charges of purchase line in Ax 2012

This is Code to get Miscellaneous charges of purchase line in Ax 2012. You can try below code to check in job. PurchTable purchTable; PurchLine purchLine; MarkupTrans markupTrans; while select * from purchLine Join purchTable Join markupTrans Where purchTable.PurchId == purchLine.PurchId && markupTrans.TransRecId == purchLine.RecId && purchTable.PurchId=="PO-0000043" { info(strFmt("%1 , %2 , %3",purchLine.PurchId,markupTrans.Txt,markupTrans.Value)); }

Query to get workflow last comment in Ax 2012

I want to highlight Query to get workflow last comment in Ax 2012. You can use ,WorkflowTrackingTable,WorkflowTrackingStatusTable  and WorkflowTrackingCommentTable   to get Last comment entered by used on submitting or approving workflow for module WorkflowTrackingTable workflowTrackingTable; WorkflowTrackingStatusTable workflowTrackingStatusTable; WorkflowTrackingCommentTable workflowTrackingCommentTable; PurchTable PurchTable; select PurchTable where PurchTable.PurchId ="PO13000003"; select ContextCompanyId, ContextTableId, ContextRecId from workflowTrackingStatusTable where workflowTrackingStatusTable.ContextCompanyId == curext() && workflowTrackingStatusTable.ContextTableId == PurchTable.TableId && workflowTrackingStatusTable.ContextRecId == PurchTable.RecId join firstonly TrackingId, CreatedDateTime from workflowTrackingTable order by CreatedDateTime desc where workflowTra...