• Adam Gilchrist
  • NEWBIE
  • 40 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
I have a custom object in which I have selected 20 fields to track. When changing these fields, it doesn't seem to add anything to the related list on the object page.
Any idea what would cause these not to show up or are there any type of additional configuration that needs to take place so users with access to the object see all the tracked field changes?
class
---------------
public class textex2 {
public string lastname ;
public string phone;
    public void create(){
        if(phone == '123'){
            account acc = new account();
            acc.name = lastname;
            acc.Phone = phone;
            insert acc;
        }else{
            contact c = new contact();
            c.lastname = 'test1';
            c.phone = '0223';
            insert c;
        }
      
    }
}
------------------------
test
@istest
public class testclassex2 {
@istest
    static void testdata2(){
        textex2 ts = new textex2();
        ts.lastname = 'test1';
        ts.phone = '125';
        ts.create();
        if(ts.phone == '123'){
        integer count = [select count() from account];
            system.assertEquals(count, 1);
            }
        ts.phone ='0234';
        ts.create();
        if(ts.phone != '123'){
            integer size = [select count() from contact];
            system.assertEquals(size,1);
        }
    }
}