Skip to main content
Question

Set text of text box using javascript


Forum|alt.badge.img+6
  • Navigator | Tier 3
  • 11 replies

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

  • Navigator | Tier 3
  • 16 replies
  • August 29, 2022

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


Forum|alt.badge.img+6
  • Author
  • Navigator | Tier 3
  • 11 replies
  • August 29, 2022

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$"


Ashwin A.K
Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 2445 replies
  • August 30, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings