+ Start a Discussion
Osiris77706Osiris77706 

Custom Button, Javascript ?

Hello Everyone,

 

      I'm trying to do something with a custom button, but I'm a little lost in how I should go about doing this. I have two custom buttons in my quote object, the first is "Submit\Revise", the second is called "Baan". There is also a custom field that this process is going to be using, its called status. When a new quote is created, the status will be set to new. By default the Baan Button should be somehow locked out/disabled. Once the user completes the quote they can press the "Submit\Revise" button, this will change the status to "Submitted" And will enable the Baan Button.

 

Does anyone have any suggestions for doing this ?

 

Thank You,

Greg Coley

Hengky IlawanHengky Ilawan

Hi Greg,

 

If you use custom button in a standard detail page, it is not possible to disable the Baan button I'm afraid, however, what you can do when the button is pressed, is to check the status field and alert user to submit/revise if the status is not yet set to "Submitted".

 

Regards,

Hengky

Janet GuoJanet Guo

Khaiwong is right, you can't really visually "disable" a button on a page based on a certain field. However, to flesh out what Khaiwong said, you can have javascript that checks the specific field you want and then determine the action of the button based what's in the field. 

 

For example, you could have the Baan button pop up an alert when it's clicked and the status is not "Submitted" that says something like "Button is not enabled until the record has been submitted." And when the status is "Submitted," the Baan button can do whatever it needs to do.