User is not getting created in Timer or automatic activity
Question
Application Type
Reactive, Service

I am trying to create user in Timer. Earlier I was trying it in Automatic activity but same error logged.

If I use same action in application it allows me to create user. 

I am getting following error:

Timer GenerateUserForCustomer error (inside action 'GenerateUserForCustomer'). Timer duration = 0 secs:Error executing query. [retry 3 of 3 scheduled]

eSpaceVer: Id=2799, PubId=0, CompiledWith=11.11.0.26942
RequestUrl: http://h6octc021.outsystemscloud.com/Loan_Core/_TimerHandler.asmx (Method: POST)
AppDomain: /LM/W3SVC/24/ROOT/Loan_Core-532-132634663492488979
FilePath: C:\OutSystems\Sandboxes\H6OCTC021\Platform Server\running\Loan_Core\
ClientIp: 127.0.0.1
Locale: en-US
DateFormat: MM-dd-yyyy
PID: 22536 ('w3wp', Started='4/6/2021 1:16:09 PM', Priv=1000Mb, Virt=2119670Mb)
TID: 8
Thread Name:
.NET: 4.0.30319.42000

OutSystems.HubEdition.RuntimePlatform.DataBaseException: Error executing query. ---> OutSystems.HubEdition.RuntimePlatform.DataBaseException: Error in advanced query FindUserByUserName in CreateUserInfo in UserAndRoleManager (select * from {User} where {User}.[Username]=@UserName ): Could not assign 'Applicant1@email.comm' to 'User.Creation_Date'... The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.
--- End of inner exception stack trace ---
at ssUserAndRoleManager.Actions.FuncActionCreateUserInfo.QueryFindUserByUserName(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount, String qpstUserName)
at ssUserAndRoleManager.Actions.ActionCreateUserInfo(HeContext heContext, STUserInfoStructure inParamUserInfo, STUserInfoStructure& outParamSavedUserInfo, STMessageStructure& outParamMessage)
at ssLoan_Core.RsseSpaceUserAndRoleManager.MssCreateUserInfo(HeContext heContext, IRecord inParamUserInfo, IRecord& outParamSavedUserInfo, IRecord& outParamMessage)
at ssLoan_Core.Actions.ActionCreateUserInfo(HeContext heContext, STUserInfoStructure inParamUserInfo, STUserInfoStructure& outParamSavedUserInfo, STMessageStructure& outParamMessage)
at ssLoan_Core.Actions.ActionGenerateUserForCustomer(HeContext heContext)
   at ssLoan_Core.TimerGenerateUserForCustomer.Execute(HeContext heContext, Int32 timeout)


Hello,

Seems like inside the Action "ActionCreateUserInfo" there is a query called "FindUserByUserName" and that query has a output structure that does not match the select of the query.

Can you check if they match? If not, can you fix it and try again?

If you don't manage to do this, please provide a printscreen of the query if possible.

Best regards


Edit: It might work if you just change the * to {User}.* on the query. And be sure that the output structure is User

Hello Tiago,

Changing * to {user}.* worked for me. Thanks.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.