You need to sign in to do that
Don't have an account?
RDM1961
Custom button for conditional new record
Is it possible for a custom button to create a new record only if certain conditions are met and provide an error message if the conditions are not met?
I want to place the button on a related list on the account page and only allow a new record on non-Partner Portal accounts. Would be great if anyone has some code that might get me started.
Thanks,
Rick
Hi,
You can create a button on the related list.
First of all the create list button in the object on which related list you want to display the button
After creating the list button add the list button in related list and the page layout by following the below steps:
search layouts->click on edit link of the List View->add the button
After adding the button you need to add the button in the related list also where you want to display the button
Edit the page layout of the object where you want to display the button
Go to the object related list ->click on the related list properties button ->click on the plus (+) of the buttons section add the custom button and click on save button
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks Navatar,
This will go on a related list on the account page, is there a way to check if the account is a Partner Portal account or not and to prevent the new record if yes?
you can create Javascript button,
If you provide related API names and new related record url,
Check your messagebox
Thanks,
bForce