project QadFinancials > class BDebtor > method ApiLoadDebtorCalcProfileCode

function returns character


Parameters


iiProfileIdinputinteger


Internal usage


QadFinancials
method BDebtor.ApiLoadDebtor


program code (program9/bdebtor.p)

define variable oiReturnStatus as integer no-undo.

if iiProfileId = ? or
   iiProfileId = 0
then return "":U.

<Q-1 run ProfilePrim (all) (Read) (Cache)
   (input iiProfileId, (ProfileId)
    input ?, (ProfileCode)
    output dataset tqProfilePrim) in BProfile >

find first tqProfilePrim where
           tqProfilePrim.tiProfile_ID = iiProfileId
           no-error.

return if available tqProfilePrim
       then tqProfilePrim.tcProfileCode
       else "":U.