project BLF > class Session > method InitInstance
Description
This method can be extended with code to execute when an instance of a business class is started.
PreCondition
This method is executed when a new instance of the business class is started, or when a draft instance is opened (in that case a new instance is started which is a copy of the draft instance).
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program/session.p)
/* Make it mandatory to Login before using other methods of session. */
assign vlLoginFailed = yes.
<M-1 run SetLogicalValue (input 'ValidLogin':U (icName),
input no (ilValue),
output viFcReturnSuper (oiReturnStatus)) in Session>
assign viSessionId = viFcCurrentInstanceId.
/* FIN-13538
* set default date format
*/
if not can-find (first tDataItems where
tDataItems.tcName = "vcDateFormat" and
tDataItems.tcDataType = "c")
then do:
create tDataItems.
assign tDataItems.tcName = "vcDateFormat"
tDataItems.tcDataType = "c"
tDataItems.tcCharValue = "mdY/".
release tDataItems.
end.
<ANCESTOR-CODE>