• palash paunikar 6
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
<apex:page controller="setterGetterapex_class" >
    <apex:form>
        <apex:pageBlock title="My calculations">
        <apex:pageBlockButtons>
            <apex:commandButton value="ADD" action="{!add}"/>
            <apex:commandButton value="SUB" action="{!sub}"/>
            </apex:pageBlockButtons>
            <apex:BlockSection title="Simple Operations">
                <apex:pageBlockSectionItem>
                    <apex:outputLabel>Enter x value</apex:outputLabel>
                    <apex:inputText value="{!xvalue}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem>
                    <apex:outputLabel>Enter y value</apex:outputLabel>
                    <apex:inputText value="{!yvalue}"/>
                </apex:pageBlockSectionItem>
                <apex:pageBlockSectionItem>
                    you ave performed{!opretion of value{!xvalue} and {!yvalue} finally result is{!result} }
                </apex:pageBlockSectionItem>
            </apex:BlockSection>
       </apex:pageBlock>
    </apex:form>
</apex:page>
I am super new to Apex and consequently struggling through. I created an Apex class with the intent that I will trigger it with Process Builder. I built a test class for it and I'm getting the error "Method does not exist or incorrect signature: void updateCustomer(Id) from the type CustomerAccountingUpdate.

Here's my Apex Class:
public class CustomerAccountingUpdate {
        
    public static string updateCustomer(Account aAccount) {
    	aAccount.c2g__CODAAccountsReceivableControl__c = System.Label.GeneralLedgerAcctsRec;
        aAccount.c2g__CODASalesTaxStatus__c = 'Taxable';
        aAccount.c2g__CODATaxCode1__c = 'AvaTax';
        aAccount.c2g__CODADaysOffset1__c = 0;
        aAccount.c2g__CODADescription1__c = 'Due Upon Receipt';
       
        update aAccount;
        
        return 'success';
    }
}


And my test Class:
@isTest(SeeAllData=true)
public class CustomerAccountingUpdateTest {
	static private Account setUpTestEnvironment() {          
         Account a =  new Account(
                               Name = 'Test Accounting Test'
                               ,Type = 'Prospect'            				   
                           );
         insert a;
        return a;
    }
    static testMethod void AccountingUpdateTest() {
         Account a = setUpTestEnvironment();
   
         Test.startTest();
         
         CustomerAccountingUpdate.updateCustomer(a.id);
         
         Test.stopTest();
    }
}


Thanks so much - this is the first time I've written a class & test totally from scratch rather than modifying something that was already there so I have no idea where I'm going wrong.
 

Error: Unknown property 'zipcodes2.pcode

vf code:- 








apex code:-
public class zipcodes2 {
List pcode{set;get;}

public zipcodes2()
{
pcode = [SELECT Id FROM Postal_codes__c] ;

    }

}