function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abby BeckerAbby Becker 

Change Record Owner dependent on another object's field value?

Hi,

I work for a community bank as an 'admineloper.' I have a custom object named Financial_Account__c and a field on that object named Responsibility_Code__c. This information is flooded from our core financial processor every night by an ETL tool. Currently, every Financial_Account_c record is owned by a dummy user used by our ETL tool. (As far as I'm aware, this is due to a limitation of our ETL tool/core.)

We are looking for a way to correct that so a User owns the record - not the dummy account.

My initial thoughts are to create a field on the User object named User_Responsiblity_Code__c and build some logic to evaluate 'if User_Responsibility_Code__c on the User object matches Responsiblity_Code__c on the Financial_Account__c custom object, change Record Owner to that User.'

I'm just not entirely sure how to go forward. Any insight or suggestions would be appreciated.

Thanks.
Prashant Pandey07Prashant Pandey07
Abby..
Question - Who will be the first user to create Financial_Account_c record. If the records are being created every time with ETL tool then what is the criteria to update the owner of Financial_Account_c records.

I'm assuming some user is creating the record and later it is being updated by ETL tool then you can create a field or formula field on Financial_Account_c called First_Owner__c and then update this field with correct owner and once ETL updated the Financial_Account_c record use workflow rule to update the owner field from the First_Owner__c.

Its not recommended to create fields on User object 

--
Thanks,
Prashant
Abby BeckerAbby Becker
Thanks, Prashant. Unfortunately, your assumption is wrong... To elaborate, our bankers create accounts in a separate program and at the end of the night our ETL tool pulls those accounts to SFDC. The record owner is the generic, dummy user. And currently, it just stays that way (this is a huge flaw in our org)... my question is how to create criteria to change that owner effectively. I'm new to this all and I've inherited a mature org... so interested in best practices and suggestions.
Prashant Pandey07Prashant Pandey07
OK...So does your ETL tool pull the owner fields as well..if yes then map the owner field to a custom Field and create a workflow rule to update the standard owner field...

--
Thanks,
Prashant