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
katriragkatrirag 

Query on user obect and update by Account name whenever account name is updated.

hi,
i have a small scenario , when account name is updated user object name also need to update.How can we achieve this with trigger ?
Abdul KhatriAbdul Khatri
Hi Karthik,

This is a very strange kind of requirements. I have never seen where you want to relate the name of the Account to the User. Anyways few questions
  1. How to find the user for update, based on which field account.
  2. Account have only Name field, User has FirstName and LastName, how you want to update them.
katriragkatrirag
Hi Abdul ,
      whenever  Account Name field is updated then User object First Name field also need to update.Can we achieve this , I mean can we update fields in User object? 
Abdul KhatriAbdul Khatri
but I do choose User based on which Account Field, you mean Name. That should not be feasible. We may expect a log of Accounts vs User.
Abdul KhatriAbdul Khatri
Please give me details so that proper help can be provided.