You need to sign in to do that
Don't have an account?
michael_mcmahon
Error: Unknown constructor 'PricebookEntry.PricebookEntry()'
I'm trying to adapt some code from Jeff Douglass that I know works, but my changes break it. For starters, I get the error "Unknown Constructor 'PricebookEntry.PricebookEntry()'" and I can't even find where this refers to. Any help appreciated, thank you.
<apex:page controller="PricebookEntry" sidebar="false"> <apex:form > <apex:pageMessages id="errors" /> <apex:pageBlock title="Find A Product" mode="edit"> <table width="100%" border="0"> <tr> <td width="200" valign="top"> <apex:pageBlock title="Parameters" mode="edit" id="criteria"> <script type="text/javascript"> function doSearch() { searchServer( document.getElementById("product2ID").value, document.getElementById("Name").value, document.getElementById("description").value, document.getElementById("unitprice").value ); } </script> <apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors"> <apex:param name="Product2ID" value="" /> <apex:param name="Name" value="" /> <apex:param name="description" value="" /> <apex:param name="unitprice" value="" /> </apex:actionFunction> <table cellpadding="2" cellspacing="2"> <tr> <td style="font-weight:bold;">Name<br/> <input type="text" id="Name" onkeyup="doSearch();"/> </td> </tr> <tr> <td style="font-weight:bold;">Description<br/> <input type="text" id="description" onkeyup="doSearch();"/> </td> </tr> <tr> <td style="font-weight:bold;">product2ID<br/> <input type="text" id="Product2ID" onkeyup="doSearch();"/> </td> </tr> </table> </apex:pageBlock> </td> <td valign="top"> <apex:pageBlock mode="edit" id="results"> <apex:pageBlockTable value="{!name}" var="product"> <apex:column > <apex:facet name="header"> <apex:commandLink value="Name" action="{!toggleSort}" rerender="results,debug"> <apex:param name="sortField" value="Name" assignTo="{!sortField}"/> </apex:commandLink> </apex:facet> <apex:outputField value="{!Name}"/> </apex:column> <apex:column > <apex:facet name="header"> <apex:commandLink value="Description" action="{!toggleSort}" rerender="results,debug"> <apex:param name="sortField" value="Description" assignTo="{!sortField}"/> </apex:commandLink> </apex:facet> <apex:outputField value="{!Description}"/> </apex:column> <apex:column > <apex:facet name="header"> <apex:commandLink value="Product2ID" action="{!toggleSort}" rerender="results,debug"> // <apex:param name="sortField" value="pricebookentry.name" assignTo="{!sortField}"/> // </apex:commandLink> </apex:facet> <apex:outputField value="{!product2id}"/> </apex:column> //<apex:column > // <apex:facet name="header"> // <apex:commandLink value="Technologies" action="{!toggleSort}" rerender="results,debug"> // <apex:param name="sortField" value="interested_technologies__c" assignTo="{!sortField}"/> // </apex:commandLink> // </apex:facet> // <apex:outputField value="{!contact.Interested_Technologies__c}"/> // </apex:column> </apex:pageBlockTable> </apex:pageBlock> </td> </tr> </table> <apex:pageBlock title="Debug - SOQL" id="debug"> <apex:outputText value="{!debugSoql}" /> </apex:pageBlock> </apex:pageBlock> </apex:form> </apex:page>
The original code from Jeff Douglas is here: http://www.stumbleupon.com/su/1ARRE8/blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/
any help greatly appreciated!
All Answers
Can you provide the controller code as well,
So that it would be helpful to understand the basic logic behind your code.
Thank you.
Regards
The original code from Jeff Douglas is here: http://www.stumbleupon.com/su/1ARRE8/blog.jeffdouglas.com/2010/07/13/building-a-dynamic-search-page-in-visualforce/
any help greatly appreciated!
Salesforce support comes through! They fixed the code. I will post if anyone asks.