Account/id = CurrentUser returns not the correct ID?

0
Hi community,   In a microflow I want to retrieve the account before any changes are made. So I want to retrieve the ‘Account’ entity from the database and then compare it to the one in memory.    But when I test this flow I just get a completly different account as a response. Is this a bug in Mendix 9.18.2 or am I doing something totally wrong? (ID looks very similar but is not)   Thanks,   There is also a Xpath constraint on the entity
asked
2 answers
1

You do have an input parameter account. Thus the calling event must pass an account object; an object from a page when called by a button or passed by the calling main microflow etc.. In all cases you already have your account object. So your retrieve should be [id = $Account]

 

Your current XPath just evaluates if the input parameter passes an object of account which equals the $CurrentUser object. Return on this XPath is true, but does not constrain the data retrieved. The retrieve just returns the first of the list of accounts from the database. ;-)

answered
0

Hi John,

 

if you want to retrieve the account, you can try below to see the correct result.

answered