• Sean 94
  • 0 Points
  • Member since 2020

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1
Hi Guy,

I have a wierd problem about apex test class, code shows below:

private with sharing class testcls {
    static testMethod void testMethod1() {
        Account a = new Account();
        a.Id = '0017F00000hZblNQAS';
        update a;

i didn't add seealldata annotation in this test class, '0017F00000hZblNQAS' is a real account record in my sandbox.

In my understanding, test classes will run in virtual environment, if we don't add seealldata annotation, we can't access to any real data in sandbox, but why my code can be executed and no issue?

Somebody can give me an explanation?
Hi All,
I have created an api integration in salesforce. From client's website a request will send to Salesforce in form of JSON. This will create record in Salesforce. Sometimes multiple requests are sending. This is causing duplicates. I don't have option to control from Client's website. Can you please tell do we have control in salesforce ??
Actual problem is there is some delay is insert operation. Due to this existing record checking is not performing. Hence duplication is causing.