You need to sign in to do that
Don't have an account?
Irish@acc
Apex Managed sharing: need help
Hi,
I have a situation like make the record as Read on a object (when <object>.<Technical Agency>.<Vendor Name> = <Dev_Lead>.<CompanyName> )..
there is a fied Technical Agency which is lookup to vendor and the Dev_Lead__c is lookup to user.
how to write the sharing for this situation please help
I think this is similar to what you are looking for.
You need to use SOQL to query the Technical_Agency__c.Name based on relationship field.
select Technical_Agency__r.Name from Vendor__c where id =<some id>
this is not working not able to get the Technical_agncy name
on project__c object there are two fileds one is Dev_Specialist__c which is in lookp with user and one is Technical_Agency__c which is in lookup with Vendor__c obj and i need company name in first case and vendor name in 2nd case
Like Vinit has said, you need to query the names via the relationship fields.
SELECT User__r.name FROM Dev_Specialist__c WHERE Id =: <some_id>
SELECT Technical_Agency__r.name FROM Vendor__c WHERE Id =: <some_id>
Not sure how all your objects are related to project, but it would be similar. The "__r" denotes a relationship.
Irish,
You will have to check how your objects are related and based upon relationship field,you can query the name field.