We’re rewarding the question askers & reputations are being recalculated! Read more.
3

It looks like what you are trying to accomplish is to return all child records for the specified Contact.Id. Just query on and return Donation__c records directly. If your lookup field has an API Name of Contact__c, your entire method body would look like: return [SELECT Name, Email1__c FROM Donation__c WHERE Contact__c = :recordId];


2

It is not possible. Custom fields always have the __c suffix and it is not optional.


1

Your type returned from a query is always defined by your FROM clause. You can sometimes assign to a singular object instead of a list when you know there is exactly one result. But the type would be the same. No other clause in your query matters. Only FROM. Please note that the syntax for querying a parent field involves using the relationship name. For ...


1

Your trigger is on the wrong object. If you want to react to delete events on classic Notes and Attachments, you'd need two triggers on the relevant sObjects: Attachment for classic Attachments Note for classic Notes If you're working with Lightning's Files and Enhanced Notes, you'd be looking at the rather more complex suite of ContentVersion, ...


1

I know its not great, but you could export the metadata for that external object as it is now, and then re-deploy it back and it will put the labels back to the way it was.


1

What do you mean by cleaner way. The IF() can be pretty clean / easy to implement if you print it clearly. IF(RecordType.Name = 'RT1', 'ABC', IF(RecordType.Name = 'RT2', 'DEF', IF(RecordType.Name = 'RT3', 'GHI', ""))) in my opinion, this is pretty clean. To answer your question, you can use the CASE function as well but this will only be as 'clean' as you ...


1

Yes, that is the standard behavior for Master-Detail relationships. The access to the detail record is determined by the access given for master. You can either provide access to the master records to specific users (through Sharing Rules) or you can maintain the lookup relationship between the two objects like you had and adjust your report to fit your ...


Only top voted, non community-wiki answers of a minimum length are eligible