and more in a single search tool across platforms. Read the announcement here. |
02/14/2023 11:17 PM
Hello,
Can anyone help us with the CustomQuery used to update the Account owner where the Username of the Account owner is stored in Customproperty36 of Accounts.
Appreciate your help!
02/14/2023 11:18 PM
@rushikeshvartak Can you take a look at this when you got time. Thank you
02/15/2023 12:17 AM - edited 02/15/2023 01:04 AM
Any reason for not using user account correlation rule for your use case?
02/15/2023 12:22 AM
These are Service Accounts so we thought to use the CustomQuery.
02/15/2023 01:05 AM
Got it, @krishna_sk .
Something like this might help. Alter the query with your endpoint key and account status that needs to be considered.
INSERT INTO accountowners(accountkey, owneruserkey, rank, updatedate, updateuser) SELECT a.accountkey AS accountkey, u.userkey AS owneruserkey, '1' AS rank, Now() AS updatedate, '1' AS updateuser FROM accounts a LEFT JOIN users u ON a.customproperty36 = u.username WHERE a.endpointkey = <insert your endpointkey> AND a.status IN ( 1, 'Manually Provisioned')
02/16/2023 02:10 AM
Sivagam, Thank you for the response. The Query ran successfully, but it doesn't updated the Owner and didn't thrown any error as well.
02/15/2023 07:07 AM - edited 02/15/2023 07:08 AM
Why don't you use upload CSV to update account owner instead of using custom query?
I won't suggest using custom query wherever there is a possibility to achieve it in otherways. Custom Query is last option that we should opt.
02/15/2023 02:18 PM
Hi Krishna,
Refer the below document to upload account owners using CSV file.
02/16/2023 02:09 AM
Hi Sk,
I Agree with the CSV approach. Currently our client is not interested with the manual approach. Hence I am looking for any workaround.
I checked the Sav for Sav DB approach but it doesn't fulfills the requirement (confirmed by saviynt support as well).
Thank you.