Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2022-08-05 04:37 PM
Hi - trying to hide the Save/Save & Close buttons when user wants to re-enroll a completed ('Done') workflow record in Advanced Workflow.
This is what I have so far but still seeing Save / Save & Close. what am I missing?
TIA
// ------------------------------------
<script type="text/javascript">
Sys.Application.add_load( function() {
var value = ArcherTech.UI.GenericContent.GetInstance().getFieldValue(30407);
if (value == 'Done') {
$('#master_btnSave1').css('display', 'none');
$('#master_btnApply1').css('display', 'none');
}
});
</script>
// -------------------
2022-08-19 10:51 AM
solved it ......
<script type="text/javascript">
Sys.Application.add_load(function() {
if ($CM.getFieldValue(30407) == '126339:0') {
$('#master_btnSave1').css('display', 'none');
$('#master_btnApply1').css('display', 'none');
}
});
</script>
2022-08-19 11:04 AM
getting the hang of this now! and to hide the small Save icon added one more line.....
<script type="text/javascript">
Sys.Application.add_load(function() {
if ($CM.getFieldValue(30407) == '126339:0') {
$('#master_btnSave1').css('display', 'none');
$('#master_btnApply1').css('display', 'none');
$('#master_btnApplyIcon').css('display','none');
}
});
</script>
2022-08-05 04:58 PM
@PeteErwin, typically the ArcherTech.UI.GenericContent.GetInstance().getFieldValue() call returns the value id (1234:0) of the selected value if the values list isn't calculated.
Advisory Consultant
2022-08-05 05:07 PM
Hi David - the status field is not calculated - it is set by AWF.
2022-08-12 09:31 AM
Hi - still working on this one - I took your suggestion + combined a few other scripts on the site... feels like I'm missing something obvious - the Save + Save and Close buttons are still showing.
<script type="text/javascript">
var valuesListFieldId = 30407; // This is the field id of the Risk Action Status values list
var valuesListValueId = 126339; // This is the id of the value 'Done' to check against
Sys.Application.add_load(function() {
var value = ArcherTech.UI.GenericContent.GetInstance().getFieldValue(valuesListFieldId);
if (value == valuesListValueId) {
$('#master_btnSave1').css('display', 'none');
$('#master_btnApply1').css('display', 'none');
}
});
</script>
2022-08-19 10:51 AM
solved it ......
<script type="text/javascript">
Sys.Application.add_load(function() {
if ($CM.getFieldValue(30407) == '126339:0') {
$('#master_btnSave1').css('display', 'none');
$('#master_btnApply1').css('display', 'none');
}
});
</script>
2022-08-19 11:04 AM
getting the hang of this now! and to hide the small Save icon added one more line.....
<script type="text/javascript">
Sys.Application.add_load(function() {
if ($CM.getFieldValue(30407) == '126339:0') {
$('#master_btnSave1').css('display', 'none');
$('#master_btnApply1').css('display', 'none');
$('#master_btnApplyIcon').css('display','none');
}
});
</script>