Important Update: Community URLs redirect issues are partially resolved. Learn More. .
2020-07-21 08:23 AM
Previously used a custom object field to hide the function button when the status of the record contains 'closed'. Since 6.7 P3 the custom object has stopped working. Is there any way to hide the AWF initiate button?
<script type="text/javascript">
var valuesListFieldId = 480;
var valuesListValueId = 732;
var valuesListValueAId = 71713;
var valuesListValueCId = 69447;
var valuesListValue;
Sys.Application.add_load( function() {
valuesListValue=$('div[id*="f' + valuesListFieldId +'c"] div:last').attr('data-valueslistvalueid');
if(valuesListValue == valuesListValueId || valuesListValue == valuesListValueAId || valuesListValue == valuesListValueBId || valuesListValue == valuesListValueCId) {
$("a[title='Update or Close Record]").hide();
});
</script>
2020-07-21 08:39 AM
Pawel, try replacing this line
$("a[title='Update or Close Record]").hide();
with
$('.tb-btn-link-left:contains("Update or Close Record")').hide();
Advisory Consultant
2020-07-21 08:39 AM
Pawel, try replacing this line
$("a[title='Update or Close Record]").hide();
with
$('.tb-btn-link-left:contains("Update or Close Record")').hide();
Advisory Consultant
2020-07-23 07:39 AM
Many thank you David for advice, it works now.
2022-11-01 02:58 AM
@PawelKotarba were you able to manage to hide the AWF Button using the above code.
I have the button with name "Next" as shown below. Can you help me how to use the button name in the above script you wrote. I tried and its not working for me.
I tried below code, but not working :
<script type="text/javascript">
var valuesListFieldId = 15103; //Status ValueList field
var valuesListValueId = 124852; //Valuelist Value "Close"
var valuesListValue;
Sys.Application.add_load( function() {
valuesListValue=$('div[id*="f' + valuesListFieldId +'c"] div:last').attr('data-valueslistvalueid'); // Not sure the exact functionality of this line
if(valuesListValue == valuesListValueId) {
$('.tb-btn-link-left:contains("Next")').hide(); // AWF Button Next
});
</script>