Set text of text box using javascript

  • 27 August 2022
  • 3 replies

Badge +4

Hi! I need help, I'm trying to run this code in javascript for to set value on textbox by ID but AA says "bot errot"


function editar (valor){

document.getElementById(Crm_CustomModule3_COBJ3CF82_LInput).value = valor;


This code works well in Chrome console.


I configured javascript actions like this:


image image

3 replies

imageneed to use above command to run JS. and only for Chrome.

Badge +4

Thanks, but I need to set a variable like value, and I configured this, but still not working


imageThe script is: document.getElementById("Crm_CustomModule3_COBJ3CF82_LInput").value = "$sFecVigIniPoliza$"

Userlevel 4
Badge +7

Hi @Erika Jaramillo​ ,


I wouldn't recommend following this approach


The document attribute is local to a given website i.e., Pure JS won't be able to detect it since its isolated from it.

This is why Browser: Run Javascript works because it operates in the same session, but then there's the problem of not being able to pass in parameters.


I'd recommend using the Capture Action, but if you really want to use JS then download and use the Web Automation Package.


I must warn you though, the WAP is a community package so it won't receive official support.


Kind Regards,

Ashwin A.K