Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom code to hide "Save" and "Save and Close"

Devi
Contributor III

Hello all,

I am trying to hide "Save" and "Save and Close" buttons in order to enroll records in to Advanced Work Flow, as the end users are not aware to use AWF buttons.

However, I want them to appear once the record is enrolled into AWF. Means, buttons should be hidden when Status is Draft and should be visible again once status is a value other than "Draft"  or when some field value changes.

I am using below code to hide buttons and its working fine:

<script>
Sys && Sys.Application.add_load(function() {
$('#master_btnApply1').css('display','none');
$('#master_btnSave1').css('display','none');
})
</script>

Please help me with code to make them visible when status changes. Also status is not Advanced Workflow Button..

1 ACCEPTED SOLUTION

Accepted Solutions

Anonymous
Not applicable

Since you are using AWF, how about using another layout.  One with the show/hide and one without?   If the default layout had the code, that could be the only time you use that, and once it is enrolled, you leave them off the layout.  It will also affect the record when it was complete and out of awf, as that is when it would go back to the default layout.

View solution in original post

3 REPLIES 3

Anonymous
Not applicable

Since you are using AWF, how about using another layout.  One with the show/hide and one without?   If the default layout had the code, that could be the only time you use that, and once it is enrolled, you leave them off the layout.  It will also affect the record when it was complete and out of awf, as that is when it would go back to the default layout.

Devi
Contributor III

Thanks for the idea @Anonymous . I will try to implement this and update you with results.

Devi
Contributor III

Thank you so much for your help @Anonymous . I have implemented your idea and it worked well.