Your UX is waiting ...interact, engage, explore in Las Vegas at CloudWorld 2023

Learn more
How to read Menu Custom Field values from Javascript API? — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to read Menu Custom Field values from Javascript API?

Accepted answer
edited Jun 8, 2022 12:05PM in General Technical Discussions 1 comment


Hi All,

I have tried reading Menu type Custom Field values. But I am getting an undefined error. I am using following code block:


Nov 2014

Code Snippet

             <script type="text/javascript">
function onbeforesave()
	var inc = window.external.Incident;
	var Prov = "";
	var ProvId = inc.GetCustomFieldByName("c$test_menu_field");
	alert("Provider ID : " +ProvId);
	var ProvLbls = inc.GetNameValues("c$test_menu_field");
	alert("Provider labels : " +ProvLbls);
	var x = xmlDoc.getElementsByTagName("Item");
	for (i = 0; i < x.length; i++) 
		var attlist=x.item(i).attributes;
		var att=attlist.getNamedItem("Id");
		if (att.value==ProvId) 
			Prov = attlist.getNamedItem("Name").value;

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!