Description
Add code here to initialize the calculated fields of a 'new' record (= a record that must be created in the application database) in a class temp-table.
Parameters
icTableName | input | character | Name of the database table of which a record is created in the class temp-table. |
oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bdivision.p)
<ANCESTOR-CODE>
if icTableName = "Division":U
then do:
assign tDivision.DivisionIsActive = true.
/* =============================================================== */
/* Set the SharedSet-ID */
/* that is linked to the current company (viCompanyId) */
/* =============================================================== */
assign vcSharedSetTypeDivision = {&SHAREDSETTYPECODE-DIVISION}.
<Q-1 run LookupSharedSetForCompany (all) (Read) (NoCache)
(input viCompanyId, (CompanyId)
input vcSharedSetTypeDivision, (SharedSetType)
output dataset tqSharedSetForCompany) in BCompany >
find first tqSharedSetForCompany no-error.
if available tqSharedSetForCompany
then assign tDivision.SharedSet_ID = tqSharedSetForCompany.tiSharedSet_ID.
end.