function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
<apex:sectionHeader title="New Product" subtitle="Add Inventory" />
<apex:pageMessages id="pageMessages" />
<apex:form id="form" >
<apex:actionRegion >
<apex:pageBlock title="Existing Inventory" id="existingInv">
<apex:chart data="{!Inventory}" width="600" height="400">
<apex:axis type="Category" fields="name" position="left" title="Product Family"/>
<apex:axis type="Numeric" fields="val" position="bottom" title="Quantity Remaining"/>
<apex:barSeries axis="bottom" orientation="horizontal" xField="val" yField="name"/>
</apex:chart>
</apex:pageBlock>
<apex:pageBlock title="New Products" >
<apex:pageBlockButtons location="top">
<apex:commandButton action="{!save}" value="Save" reRender="existingInv, orderItemTable, pageMessages"/>
</apex:pageBlockButtons>
<apex:pageBlockButtons location="bottom">
<apex:commandButton action="{!addRows}" value="Add" reRender="orderItemTable, pageMessages" />
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!productsToInsert}" var="p" id="orderItemTable" >
<apex:column headerValue="{!$ObjectType.Product2.Fields.Name.Label}" >
<apex:inputText value="{!p.productRecord.Name}" />
</apex:column>
<apex:column headerValue="{!$ObjectType.Product2.Fields.Family.Label}" >
<apex:selectList value="{!p.productRecord.Family}" size="1" multiselect="false">
<apex:selectOptions value="{!FamilyOptions}"></apex:selectOptions>
</apex:selectList>
</apex:column>
<apex:column headerValue="{!$ObjectType.Product2.Fields.IsActive.Label}" >
<apex:inputField value="{!p.productRecord.isActive}" />
</apex:column>
<apex:column headerValue="{!$ObjectType.PricebookEntry.Fields.UnitPrice.Label}" >
<apex:inputText value="{!p.pricebookEntryRecord.UnitPrice}" />
</apex:column>
<apex:column headerValue="{!$ObjectType.Product2.Fields.Initial_Inventory__c.Label}" >
<apex:inputField value="{!p.productRecord.Initial_Inventory__c}" />
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:actionRegion>
</apex:form>
</apex:page>
You need to go the Product Object's "Button, Links and Actions" settings.
Then add Product2New VF Page as an override on the Add Button.
After doing as @Fickle Techie has explained, you must equaly add Product2New VF Page as an override on the New Button (CreateNewProduct). As bellow:
I've done all of the previous and was unable to complete, I'm Brazilian so my User was in Portuguese, when I changed it to English, it worked.
go through this screen shot
Be sure that override is done only for Add & New buttons, no need to do override for button "Add to Category".