I'm deploying all the code from a 1stGen Package to a new Scratch org, to improve our development/testing/release process.
There were a few deploy errors but I've fixed all but two types. This is one of them.
The deploy process reports:
\pages\QuickCreateWizard_Account.page Could not resolve the entity from <apex:inputField> value binding '{!acc.Name}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable.
\pages\QuickCreateWizard_Contacts.page Unknown property 'String.name'
\pages\QuickCreateWizard_Contract.page Unknown property 'String.Name'
\pages\QuickCreateWizard_InspectionItems.page Unknown property 'String.name'
\pages\QuickCreateWizard_Schedule.page Unknown property 'String.name'
All the pages use a StandardController and one extension class.
In that class is defined:
public Account acc {get;set;}
And it is this Account object that is causing the issues, when used like this:
<apex:inputField id="secFirId" styleClass="slds-input form_control" value="{!acc.name}" onchange="assignValueNull(this);" />
(for the first error)
or just
{!acc.name}
for the other errors.
The pages work in our Dev Edition org - they deploy correctly and run correctly.
So, there are no conflicting properties called acc
and certainly not one defined as a string
The first line of the QuickCreateWizard_Account.page
is
<apex:page showHeader="true" standardController="Account" extensions="QuickCreateWizardController" lightningStylesheets="true">
\
Other properties and methods defined in the extension, both data types (boolean for example) or SObjects work as expected. It's just this one property that doesn't work, in the same way across several pages.
Any ideas? Thanks!
acc
by any chance? Also use edit and post the<apex:page
first lineacc
is defined, in the Extensions used by the page, is where it's defined as an Account. There are plenty of other Apex classes that do have lines likestring acc
but none are directly referenced on this page. The Extension classQuickCreateWizardController
doesn't extend another class, Is there perhaps another way a property can be accessed, other than by defining it in a referenced Extension class?Account
as an sobject?