rbv_api.createRecord() API doesn´t work in a trigger. What&#

Posted by Edilberto Mariño Moya on 16-Feb-2016 23:24

var url='http://...';
  var strRespuesta=rbv_api.sendHttpGet(url);
  var obj=JSON.parse(strRespuesta);
  var result=obj.result[0];
  var respuesta=result.respuesta;
  var datos=respuesta.datos;
  var ii = datos.length;
  var j=0;
  for(i=0;i<ii;i++){
      var x = new Array();
      x.Nit=datos[i].init;
      x.Primer_Nombre=datos[i].ntercero;
      x.Primer_Apellido=datos[i].napellido;
      rbv_api.createRecord('tercero',x);
  }

Any idea?

Best regards

All Replies

Posted by Anoop Premachandran on 17-Feb-2016 00:16

Are you trying in debug mode ?

Posted by Edilberto Mariño Moya on 17-Feb-2016 00:27

Hi Anoop

Yes, the error in debug mode is "Field "Nit" must have a value (line #16)". But Nit field isn't empty.

Thanks

Posted by Karthikeyan Bhaskaran on 16-Mar-2016 03:49

Sorry for the delay in following up with you.

Is this problem happening only with the field Nit?

What is its type?

Would it be possible for you to share a simpler version of the application?

This thread is closed