project BLF > class Session > method ApplicationLoginFromUI

Description

This method combines some methods on session to reduce roundtrips to the appserver.


Parameters


icGlobalSessionIdinputcharacteridentification of the global session
icCompanyCodeinputcharacterEntity to log in to.
When empty, default entity will be used
icExtrainputcharacterExtra parameters for login, chr(2) separated
DebugLevel {2} 0-63 {2} RefreshCompanyData {2} Y/N
ilReturnTimeStampsinputlogical
ilTranslationTracinginputlogicalWhen true, lookup value for the timestamp parameters.
When false, timestamp parameters remain empty.
iiDebugLevelinputintegerdebug level for business logging
icDateFormatinputcharacterPass the client date format to the server, for usage f.e. in error messages.
format = mdy / dmy
icNumericFormatinputcharacterPass the client numeric format to the server, for usage f.e. in error messages.
format = european / american / . / ,
ocReportTimeStampoutputcharacterReturns the timestamp of the most recent updated report file (standard reports + custom reports).
format is 'mm/dd/yy=>>>>9;mm/dd/yy=>>>>9'.
ocSystCacheDateTimeoutputcharacterIf persistent cache on the client is older that this timestamp, it must be updated.
ocSystDateTimeoutputcharacterReturns local time on the server.
oiPriceDecimalsoutputintegerReturns fixed number of decimals to display prices.
(for implementation by Enterprise Financials)
oiQtyDecimalsoutputintegerReturns fixed number of decimals to display quantities.
(for implementation by Enterprise Financials)
ocTCDecimalsoutputcharacterReturns a list of currency codes and it's decimal settings.
(for implementation by Enterprise Financials)
tCyGroupoutputtemp-tableComma separated list of entity groups of which current user has authorization to access all member entities.
tDataItemsoutputtemp-table
tFilterVariableoutputtemp-table
tSharedSetsoutputtemp-table
tCompanyCurrenciesoutputtemp-table
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program1/session.p)

<M-3 run SetLogicalValue
   (input  'vlTranslationTracing':U (icName), 
    input  ilTranslationTracing (ilValue), 
    output viFcReturnSuper (oiReturnStatus)) in Session>

<M-4 run SetDebugLevel  (input  iiDebugLevel (iiDebugLevel)) in Session>

<M-7 run ApplicationLogin
   (input  icGlobalSessionId (icGlobalSessionId), 
    input  icCompanyCode (icCompanyCode), 
    input  icExtra (icExtra), 
    input  ilReturnTimeStamps (ilReturnTimeStamps), 
    output ocReportTimeStamp (ocReportTimeStamp), 
    output ocSystCacheDateTime (ocSystCacheDateTime), 
    output ocSystDateTime (ocSystDateTime), 
    output oiReturnStatus (oiReturnStatus)) in Session>

<M-5 run SetCharacterValue
   (input  'vcDateFormat':U (icName), 
    input  icDateFormat (icValue), 
    output viFcReturnSuper (oiReturnStatus)) in Session>

<M-6 run SetCharacterValue
   (input  'vcNumericFormat':U (icName), 
    input  icNumericFormat (icValue), 
    output viFcReturnSuper (oiReturnStatus)) in Session>

<M-8 run GetDecimalSettings
   (output oiPriceDecimals (oiPriceDecimals), 
    output oiQtyDecimals (oiQtyDecimals), 
    output ocTCDecimals (ocTCDecimals), 
    output viFcReturnSuper (oiReturnStatus)) in Session>

<M-1 run GetCompanyCurrency
   (output tCompanyCurrencies (tCompanyCurrencies), 
    output viFcReturnSuper (oiReturnStatus)) in Session>

<M-96 run GetEntityGroups
   (output tCyGroup (tCyGroup), 
    output viFcReturnSuper (oiReturnStatus)) in Session>

<M-10 run CreateFilterVariables  (output viFcReturnSuper (oiReturnStatus)) in Session>

empty temp-table tSharedSets.
<Q-37 run LookupSharedSetForCompany (all) (Read) (NoCache)
   (input viCompanyId, (CompanyId)
    input '', (SharedSetType)
    output dataset tqSharedSetForCompany) in BCompany >
for each tqSharedSetForCompany on error undo, throw:
    if can-find (tSharedSets where
                 tSharedSets.tcSharedSetTypeCode = tqSharedSetForCompany.tcSharedSetTypeCode)
    then next.
    create tSharedSets.
    assign tSharedSets.tcSharedSetTypeCode = tqSharedSetForCompany.tcSharedSetTypeCode
           tSharedSets.tiSharedSet_ID      = tqSharedSetForCompany.tiSharedSet_ID.
end.