• Naksh verma
  • -1 Points
  • Member since 2021

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 4
Apex tests have started to fail where we assert PersonEmail field is populated.

Replicated the issue in Execute Anonymous via the following code:
Account customer = new Account();
customer.RecordTypeId=[select id from RecordType where sObjectType = 'Account' and DeveloperName = 'Consumer' limit 1].Id;
customer.lastname='Test Account';
customer.personEmail = 'test.testAAA@example.eu';
customer.PersonHomePhone = '061386212';
insert customer;

customer= [select id, name, firstname, lastname, personEmail, PersonHomePhone, IsPersonAccount  from account where id=:customer.id];
system.debug(logginglevel.info,'Account = '+customer);
system.debug(logginglevel.info,'Account.personEmail = '+customer.personEmail);
system.debug(logginglevel.info,'Account.PersonHomePhone = '+customer.PersonHomePhone);
The debug logs show PersonHomePhone populated but PersonEmail is null.  The Person Email field is visible on the record after creation via the UI and via a query in Developer Console.

After a random period of time the same query in Execute Anonymous starts to return the PersonEmail field.

I have also witnessed the field being populated if I query it via a list, but empty if I specify an Id in the where clause.

Query list:

Query with Id:

Very strange behaviour.

There seems to be some slow running process that means PersonEmail is not immedeatly available to query (even though it is visible via the UI).

Please help.

Not able to use case comment object.Initially we write few lines of code on case comment object and it was working. But, now when we are trying to change the code its is showing invalid variable commentbody error message. Then i  reverted all the changes and just tried to save the method as earlier. But now also im not able to save that class. Same code is not giving errors in UAT but getting error in Dev sandbox. 

   public static void UpdateCaseComment(string Id, string comment ){
        casecomment cc=new casecomment();
            update cc;
        }catch(Exception e){

This is my code 
Please let me know what is causing this issue.


In any mobile flow, when finishing it shows a white screen with a green check and saying '[flow_name] completed!'. However in our mobile flows, we have some field validations at first and in some cases shows a custom error message, warning the user that cannot perform the action. And right away, when doing next on the flow, it shows the message that finished with success, misleading the user with the outcome.

It's possible to remove this screen or even change it?


Hi all,


I have to change a case owner in a before trigger. The trigger works fine when i use an Administrator profile and the case owner is chnaged to that of a queue, but when i try changing the owner when using a user who's not an admin, i get an error saying that i don't have enough priviledges to perform the action.



I've put debug logs throughout the code to figure out the error,

The owner id actually is assigned the Queue Id, i think it's during the save operaion that i've missed something or there's an error.


can someone please point me in the right direrction and help me figurre out the error?

  • October 10, 2013
  • Like
  • 1