Script for Default value while creting a column

NRavindra
Tera Contributor

We have 2 defect related list in the project , one is parent-> Defect(v1), and other one is org sys ID-> Defect(v2) .

Suppose I am creating record under the v1 , dp column default values is 1 and creating  defect recrod under the v2 ,the defauld value of DP is 2. How can write the code for default value ,

javascript:(function()
{
          if (parent.number.startsWith('DEFC'))
              {
current.dp=1;
  } 
  else if (orig_sys_id.number.startsWith('DEFC'))
  {
current.dp=2;
 
   }
 
})();
0 REPLIES 0