• sermetege
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 5
    Replies
My Controller : 
Controller
My Test:
User-added image

I want to write test for my controller but i can't. Can anyone help for this? Regards :)

What is wrong with my code? After i execute it,  annualvalue dont change...

public class ChangeValue{
    public ChangeValue(){
        List<Contact> cts = [SELECT ID, AccountID from Contact Where Name = 'test'];
		//Get list of account IDs    
		Set<ID> accountids = new Set<ID>();
        for(Contact ct: cts) if(ct.AccountID!=null){
        	accountids.add(ct.AccountID);}
        if(accountids.size()>0)
        {
            List<Account> accounts = [Select ID, AnnualRevenue 
                                      from Account where ID in :accountids];
            for(Account accountfound: accounts)
                if(accountfound.AnnualRevenue != 0)
                accountfound.AnnualRevenue = 500;
            update accounts;
        }
    }    
}

 

I created formula for my Amount_New__c field that equals to result of quantity * Sales Price * Duration. My calculated amount must be shown in quotes object as total price. How can i do that?

In the 3rd and 4th picture Grand Total and total price should be equal to value of amount field in picture one
 
http://img441.imageshack.us/slideshow/webplayer.php?id=pb61.png

When i creating pdf in echosign i use date and name field...
http://postimg.org/image/q89j5p0gx/

The thing that i want is sending salesforce data(name,date) via pdf i attached to echosign... What should i do?


http://postimg.org/image/4yqyryqht/

My Controller : 
Controller
My Test:
User-added image

I want to write test for my controller but i can't. Can anyone help for this? Regards :)

What is wrong with my code? After i execute it,  annualvalue dont change...

public class ChangeValue{
    public ChangeValue(){
        List<Contact> cts = [SELECT ID, AccountID from Contact Where Name = 'test'];
		//Get list of account IDs    
		Set<ID> accountids = new Set<ID>();
        for(Contact ct: cts) if(ct.AccountID!=null){
        	accountids.add(ct.AccountID);}
        if(accountids.size()>0)
        {
            List<Account> accounts = [Select ID, AnnualRevenue 
                                      from Account where ID in :accountids];
            for(Account accountfound: accounts)
                if(accountfound.AnnualRevenue != 0)
                accountfound.AnnualRevenue = 500;
            update accounts;
        }
    }    
}