function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jadenjaden 

Error Method does not exist or incorrect signature error

I am getting above error on this line contained in block of code below:

 

Address_parts=AccttoUpdate.BillingStreet('\n');


 

AccttoUpdate = [SELECT acc.Id, acc.Name, acc.AccountNumber,          acc.EDR_Password__c, acc.Industry, acc.Ownerid, acc.ShippingStreet,acc.Shippingcity, acc.ShippingState, acc.ShippingCountry, acc.ShippingPostalCode, 
acc.BillingStreet,acc.BillingCity, acc.BillingState, acc.BillingCountry, acc.BillingPostalCode 
FROM Account acc  
WHERE acc.ID = :AccttoUpdateID];
   	
       		
	//Split SF Street into 2 fields
	List<string> address_parts = new List<String>();
	Address_parts=AccttoUpdate.BillingStreet('\n');

	If(address_parts.size()>=1)
            edrNewCustomer.Address1=address_parts[0];

	If(address_parts.size()>=2)
             edrCustomer.Address2=address_parts[1];

 Any Assistance greatly appreciated.

Best Answer chosen by Admin (Salesforce Developers) 
jadenjaden

Thank you for the fix, just could not see I missed the split.

All Answers

sfdcfoxsfdcfox
Address_Parts = AccttoUpdate.BillingStreet.Split('\n');

 

jadenjaden

Thank you for the fix, just could not see I missed the split.

This was selected as the best answer