| icDraftReference | input | character | Description for the draft instance. This parameter will have a value when creating a draft instance. |
| icDraftFormName | input | character | This parameter will have a value when creating a draft instance. |
| ilDraftIsShared | input | logical | This parameter will have a value when creating a draft instance. |
| oiReturnStatus | output | integer | Return status of the method. |
<ANCESTOR-CODE>
if viCurrentDraftInstanceId = 0
then for each tDDocument where
tDDocument.tc_Status = "N":U and
tDDocument.DDocumentNumber <> 0 and
tDDocument.DDocumentNumber <> ?:
assign vhFcComponent = ?.
if icDraftReference = "":U
then do:
<M-1 run ReleaseNumber
(input tDDocument.Company_ID (iiCompanyId),
input tDDocument.DDocumentYear (iiNumbrYear),
input 'D':U + tDDocument.DDocumentType (icNumbrType),
input tDDocument.DDocumentNumber (iiNumbr),
input viFcCurrentInstanceId (iiInstanceId),
input vcFcComponentName (icClassName),
output viFcReturnSuper (oiReturnStatus)) in BNumber>
end.
else do:
<M-2 run StoreNumber (input tDDocument.Company_ID (iiCompanyID),
input tDDocument.DDocumentYear (iiNumbrYear),
input 'D':U + tDDocument.DDocumentType (icNumbrType),
input tDDocument.DDocumentNumber (iiNumbr),
output viFcReturnSuper (oiReturnStatus)) in BNumber>
end.
if viFcReturnSuper < 0 or
oiReturnStatus = 0
then assign oiReturnStatus = viFcReturnSuper.
if oiReturnStatus < 0
then return.
end.