Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2019-02-27 04:26 AM
Hi everyone,
Looking for a custom object that should not allow the record to save and should give an alert if a calculated field flag has been set to yes.
Instance version 6.5
Thanks
Amit
2019-02-27 04:54 AM
Something similar:
2019-02-27 04:59 AM
var x= document.getElementById( id_a ).value();
if(x== "yes")
{
document.getElementById( id_b).hide();
alert("your alert");
}
*note : id_a is calculated field id
id_b is the save button id
both id's can be found by inspect element
2019-02-27 05:53 AM
<script type="text/javascript">
$(document).ready(function(){
var calcfield = String(ArcherTech.UI.GenericContent.GetInstance().getFieldValue(*****,false)); //***** - Calculated Field ID
if(calcfield='$$$$$:0') //$$$$$ - Value ID of YES within the calculated field
{
$('#master_btnApply').hide();
$('#master_btnSave').hide();
WarningAlert("Enter Your Text","Warning"); //Replace "Enter Your Text" with your content
}
});
</script>