project QadFinancials > class BJournalEntry > method PassRowIdBasedOnPostingIdInInstance

Description

Pass the rowid based on the given posting id, in the instance


Parameters


iiPostingIdinputintegerPosting ID
ocPostingRowIdoutputcharacterRow Id of Posting
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


QadFinancials
method BCInvoice.ApiStdMaintainTTWithIntPost
method BCInvoice.CreateCIPosting
method BDInvoice.ApiStdMaintainTTWithIntPost
method BDInvoice.CreateDInvoicesDeduction
method BDInvoice.CreateDIPosting
method BDInvoice.StdMaintainTTWithIntPost


program code (program3/bjournalentry.p)

if iiPostingId = 0
    then do:
        assign vcMessage      = trim(#T-3'You must enter the posting ID if you want to delete the instance lines.':150(2735)T-3#)
               oiReturnStatus = -1.
        <M-1 run SetMessage (input  vcMessage (icMessage),
                     input  '':U (icArguments),
                     input  '':U (icFieldName),
                     input  '':U (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  '':U (icRowid),
                     input  'QADFIN-713':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BJournalEntry>
        return.
    end.

    find tPosting where
         tPosting.Posting_ID = iiPostingId 
         no-error.
    if not available tPosting
    then do:
        assign vcMessage      = trim(#T-4'The posting record cannot be found.':150(2736)t-4#)
               oiReturnStatus = -1.
        <M-2 run SetMessage (input  vcMessage (icMessage),
                     input  '':U (icArguments),
                     input  '':U (icFieldName),
                     input  '':U (icFieldValue),
                     input  'E':U (icType),
                     input  3 (iiSeverity),
                     input  '':U (icRowid),
                     input  'QADFIN-714':U (icFcMsgNumber),
                     input  '' (icFcExplanation),
                     input  '' (icFcIdentification),
                     input  '' (icFcContext),
                     output viFcReturnSuper (oiReturnStatus)) in BJournalEntry>
        return.
    end.

    assign ocPostingRowId = tPosting.tc_Rowid.