Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

Update Custom Field Information
[Changed.CustomField("6364").Changed]

function on_save() {
    if(Changed.CustomField("val_a").NewValueAsNumber <= 50){
		Service.UpdateCustomField("datetime", "20001212 12:12");
		Service.AddMessage("Custom field successfully updated", "notify-success");
		
        return true;
    } else if(50 < Changed.CustomField("val_a").NewValueAsNumber < 100){
		Service.UpdateCustomField("text", "17");
		Service.AddMessage("Custom field successfully updated", "notify-success");
		
		return true;
    } else {
		Service.AddMessage("An error occurred while updating custom field", "notify-error");
		
        return false;
    }
}

//Service.UpdateCustomField(string nameOrId, string newValue), where nameOrId - name or id of custom field
  • No labels