0

I know the error 'SObject row was retrieved via SOQL without querying the requested field:XYZ' comes up when we try to access an object field without adding it(XYZ) in the SOQL query. I need a way to handle this exception.

I have written the apex logic in a try block and when any exception was caught, triggers an email to admins so that they can quickly look into it.

But, as this exception was not thrown in the apex code, we haven't received any email. Is there a way to handle this sort of exceptions / errors? Some way, if a mail can be triggered to certain users is sufficient.

4
  • For getting better support, share your code snippet.
    – Raul
    Commented Jul 14, 2017 at 8:01
  • 2
    Are you using community? Take a look here if you do: salesforce.stackexchange.com/questions/160625/…
    – Roman
    Commented Jul 14, 2017 at 8:14
  • @Rahul In his question I don't think we need code sample. He just want to handle exception occur in VF page and throw an email to developer. Commented Jul 14, 2017 at 8:15
  • Yes, we are using Community. Thanks @Roman for sharing the link. It solved our problem.
    – Lucky
    Commented Jul 14, 2017 at 11:29

0

You must log in to answer this question.

Browse other questions tagged .