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 set custom object Text Field in Javascript API

Received Response
21
Views
1
Comments
edited Feb 13, 2019 7:58AM in Agent Desktop 1 comment

Summary

How to set custom object Text Field in Javascript API

Content

Hi All,

I am trying to set a custom object field in javascript API. The value is not set in a particular field. Could anyone please help me to solve the issue?

Kindly find the attached snippet. I have to get the custom object and need to set the field values in the respective custom object text field.

Regards,

Muthu

 

Code Snippet

function muthu()
			{
				var fromVal=$("#fromVal").val();
				var toVal=$("#toVal").val();
				//var co = window.external.GetCustomObject(CO,x_co_cnc);
				
				var co = getCustomObject('CO', 'x_co_****');	
				
				alert("from Val:"+fromVal);
				alert("to Val:"+toVal);
				//co.SetCustomFieldByName("c$x_from", "fromVal");
				co.SetCustomFieldByName("c$x_from", fromVal);
				co.SetCustomFieldByName("c$x_to", toVal);							
			}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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