Post navigation

2 thoughts on “Apex Tip: check if field exists on SObject”

I am new to Salesforce and I appreciate your tip to check if field exists on SObject.

Now, I could not figure out how to use this for the CURRENT object.

To be clear, I have a trigger on the Note object calling a function in a dedicated class, and this function needs to know if a given field exists, then to retrieve its value.
The point is that this is supposed to work an ANY object having Notes & Attachment as a related list.