Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object to hide save and save and close when set to a calculated field as yes

AmitMIshra
Contributor III

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

3 REPLIES 3

Ilya_Khen
Champion III

Anonymous
Not applicable

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 

Arun.Prasad
Advocate II

<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>