You need to sign in to do that
Don't have an account?
KidNiki
Can not get Relationship Query to return correct info on User Object ManagerId...
Hello,
Im trying to write a trigger that updates a field with either the manager or the DelegatedApprover's name. I used a list to pull all of the id's in to query the database and then a map to gather the info from the User Object. The problem that I am running into is that when I run my query it returns everything but the referenced stuff.
here is my query/code:
for (SFDC_Expense_Header__c Expnse : Trigger.new){ exRoleId.add(Expnse.OwnerId); } Map<id, User> usr = new map<id,User>([Select UserRoleId, Manager.Username, DelegatedApproverId.Username From User where id in :exRoleId]);
ThanX for the help!
Figured it out! :P Was using the Object type instead of the reference when setting the value in the last for loop! :P
All Answers
Here is the full trigger with what I am trying to do now. It still will not save to my sandbox
Im getting the error, "Description Path Resource Location Type
Save error: Expression cannot be assigned /VinSandBox/src/triggers SFDC_Expense_Trigger.trigger line 0 Force.com save problem"
Helllp!
Figured it out! :P Was using the Object type instead of the reference when setting the value in the last for loop! :P