You need to sign in to do that
Don't have an account?
Staci Cara
When the Account Owner changes the content of another custom Subject field shall be deleted
Hi guys,
I am struggling to find a solution to my problem.
I have the case that if the Account Owner changes to a specific User X a custom field with SObject__c records of this account shall be emptied the else case is already coded.
Can someone please help me with this?
Thank you in advance!!
List<Account> accountList = [Select Id,OwnerId,Owner.Name from Account limit 1];
System.debug('OwnerId:'+accountList[0].OwnerId);
System.debug('OwnerId:'+accountList[0].Owner.Name);
All Answers
List<Account> accountList = [Select Id,OwnerId,Owner.Name from Account limit 1];
System.debug('OwnerId:'+accountList[0].OwnerId);
System.debug('OwnerId:'+accountList[0].Owner.Name);
List<Profile> profileList = [select Name from Profile where id=:UserInfo.getProfileId()];
System.debug('Profile Name:'+profileList[0].Name);