Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get CustomField value with JavaScript

Matis Aas
Contributor
April 13, 2023

Hi all,

I'm trying to fetch CustomField value by using JavaScript in Announcement banner. However it always returns me null, can't figure this out. I thought that maybe JavaScript runs before the HTML elements are loaded and therefore it returns null, but even if I use jQuery to ensure HTML is loaded, it still returns null...
This is the method I use to get the value:
document.getElementById('customfield_10402') 


What I want to achieve is that when that field has a specific value, it displays an instructional popup message to the user(this part works). 


Regards,
Matis



0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira service management, jsm webinar, ai in jsm, opsgenie integration, incident management, virtual agent, atlassian intelligence, ai-powered service desk, it operations, atlassian learning, service management webinar, team '25 recap

What’s new in Jira Service Management 🤔

Discover how Atlassian is revolutionizing service management with cutting-edge solutions for AI-powered support, HR Service Management, or DevOps connectivity.

Register here ⬇️
AUG Leaders

Atlassian Community Events