• palash paunikar 6
  • 0 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 2
<apex:page controller="setterGetterapex_class" >
        <apex:pageBlock title="My calculations">
            <apex:commandButton value="ADD" action="{!add}"/>
            <apex:commandButton value="SUB" action="{!sub}"/>
            <apex:BlockSection title="Simple Operations">
                    <apex:outputLabel>Enter x value</apex:outputLabel>
                    <apex:inputText value="{!xvalue}"/>
                    <apex:outputLabel>Enter y value</apex:outputLabel>
                    <apex:inputText value="{!yvalue}"/>
                    you ave performed{!opretion of value{!xvalue} and {!yvalue} finally result is{!result} }
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:
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();

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] ;