Quantcast
Channel: ServiceNow Community - Development & Integration
Viewing all articles
Browse latest Browse all 423

Revert a list edit change

$
0
0

Hi,

I am trying to validate/revert a change made while editing an item in a related list displayed in a record. take the following script as an example:

Record: List Client Script
Type: onChange
List control: sales_opportunity
Field name: u_price

function onChange(sysId, oldValue, newValue){ 
  var price = newValue;
 
  if(isNaN(price)){// revert value/*
    what do I do here?
    somthing like: g_list.renderer.cancel(); // i know this method does not exist
    */return;
  } 
  /*
  Do stuff with number
  */ 
}

read more


Viewing all articles
Browse latest Browse all 423

Trending Articles