Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..

cancel
Showing results for 
Search instead for 
Did you mean: 

Set the comment field to blank using custom code

Anonymous
Not applicable

Hi Team,

 

can somebody help me in achieving  the below requirement using custom objects, or is there any other way without custom code, we are trying to avoid use of data feed for this.

 

pastedImage_1.png

pastedImage_2.png

here we wants to set the Reviewer Comments field to 'empty/null' when the exception Review Status is "In Process"

i tried using the below code, but doesn't work, 

 

<script type = "text/javascript" >

Sys.Application.add_load(function(){
var a=document.querySelectorAll("[data-valueslistvalueid='104902']")[0].innerText;
if(a==In Process)
document.getElementById("master_DefaultContent_rts_s4889_f44597c").innerText=" "
}
);
</script>

14 REPLIES 14

Anonymous
Not applicable

Hi David,

 

pastedImage_1.png

we are getting the above error, cannot read property innerText , not sure which innerText it referring to 

 

the code is running fine in view and edit mode when the status is 'Approved'

when the status becomes other than approved then i am not able to scroll up and down the record.

but when i am clicking the mark button in below screenshot then i am not able to scroll the record 

pastedImage_2.png 

We have a requirement by business where we want to clear the comment in view and edit when record is approved 

Clicking on the Record.aspx?id=265-3... link should take you to the line of the code that threw that error.

 

Clicking that image you posted is meant to hide/show the navigation header, nothing else.

 Advisory Consultant

Anonymous
Not applicable

pastedImage_1.png

Anonymous
Not applicable

Hi David,

we are getting the above error only when the Status is Other than "Approved"

Depending on the record mode (edit or view) that element attribute isn't found and throwing the error or the value for that attribute is different.

 

As I posted above, https://community.rsa.com/thread/206054#comment-956913  you should be writing the code based on how the elements are constructed based on the record view.

 Advisory Consultant