0

I have inserted a contact and tried querying in next line, but i am getting no record.

Contact con=new Contact(lastName='Pikachu');
insert con;
System.debug(con.id); //This is printing the contact id which is real i checked via viewing in detail page
con=[Select id,name,lastName,someFormulaField__C from contact where id=:con.id];
//Some code

Am getting List has no rows for assignment exception all of a sudden, this code used to work without any hassle just few hours back.

I tried querying the same id in workbench ,still got no records, but when i try after a minute or two i get record. My instance is Cs31, is something wrong with salesforce?

Anyone faced something similar problem?

7
  • You tried this in anonymous code in dev console?
    – sfdcFanBoy
    May 10 '16 at 6:10
  • According to this there is no issue with your instance:http://trust.salesforce.com/trust/instances
    – Mr.Frodo
    May 10 '16 at 6:12
  • Yes i tried in anon block and we got the same issue May 10 '16 at 6:28
  • 1
    I encounter the same issue in a full sandbox after it was upgraded to Summer 16. When I add ALL ROWS to the query, it will find the record, but the isDeleted flag indicates false. When I add certain fields to the SELECT section of the query, it does find the record.
    – svenf
    May 10 '16 at 7:18
  • Let me ask something... As you mentioned in the code, Are you querying that Con.id in the same executing Class or Trigger...?
    – Subhash
    May 10 '16 at 7:28
1

I have tried your code in Summer'16 upgraded Sandbox and working fine.

If you still have some issues, please contact Salesforce support or log a case so that they can check there internal logs to verify if there is any known issue or bug.

0
0

I have contacted Salesforce and raised a case for the same. Its a salesforce bug that came with Summer 16 release. The objects that have Skinny tables enabled are causing this issue. A temporary fix provided is to disable the Skinny table. More info can be found here.

https://success.salesforce.com/issues_view?id=a1p3A000000IXfzQAG

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.