You need to sign in to do that
Don't have an account?
Chintan Jadwani 3
Standard New button for Standard Object Product on vf page
Hi,
I have to show New button on Custom VF page. I found a line of code on this forum as below:
<apex:commandButton action="{!URLFOR($Action.Custom_Object__c.New)}" value="New Button"/> and it worked for other objects.
For standard object, it works for Account :<apex:commandButton action="{!URLFOR($Action.Account.New)}" value="New"/>
However, for standard object "Products" it is not working.
I have tried : action="{!URLFOR($Action.Product.New)}" not as action="{!URLFOR($Action.product2.New)}" even.
Can anyone suggest if I am doing wrong?
Thank You.
Chintan
I have to show New button on Custom VF page. I found a line of code on this forum as below:
<apex:commandButton action="{!URLFOR($Action.Custom_Object__c.New)}" value="New Button"/> and it worked for other objects.
For standard object, it works for Account :<apex:commandButton action="{!URLFOR($Action.Account.New)}" value="New"/>
However, for standard object "Products" it is not working.
I have tried : action="{!URLFOR($Action.Product.New)}" not as action="{!URLFOR($Action.product2.New)}" even.
Can anyone suggest if I am doing wrong?
Thank You.
Chintan
All Answers
It worked. I am not sure why it is different for product only? Any idea?
You can say that this is a kinda of exception in API naming (few more objects follow this weirdness.. :) )