I have few record which I build them in Appian and save into DB. Below are records which I build in Appian which has "doddapap" my id for created by and updated by fields. But on writing these records DB these fields are getting updated with "Administrator.
Can Someone help me fixing this.
Discussion posts and replies are publicly visible
Would need more context (screenshots) to determine the issue.
Hi, you can user to user function before saving to DB
Need more context and try debugging through Process history of an instance , There might be a change you are updating these values again
I think in the process model you gave like loggedInUser() for the CRETED_BY .change it to pp!initiator then you will get the username in that field.
This is rule I'm passing in the PM to the process variable. I'm not passing any separate values for createdby and updatedby.. just building the record using requestid as input.
When I pass the request id in the rule it showing correct values for createdby and updatedby as in the 1st screenshot.
I have checked the Process History it is having Administrator.
Could it be that you called the loggedinuser() function inside the process context? This will always return the admin account.
Im just calling this rule in the PM to build the record and in the process history contains administrator in createdby and updatedby fields.
This rule gives the result as in below screenshot
we would need to see the actual contents of the rule. but as Stefan already noted below, I'd guess you're calling "loggedInUser()" in the rule which when called in the context of a running process will often reference the author of the process model or something else other than the person who's actually running the process.
p2005 said:Im just calling this rule