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

Set Value of a Parent field using JavaScript API

Received Response
21
Views
5
Comments
edited Nov 3, 2017 4:50PM in Integrations and APIs 5 comments

Content

Hi All,

I am trying to set the value of a parent field "Resource" for Incident object using JavaScript API (inside a custom script). Whenever a new incident is created , I want to set this parent field based on a report result. I am able to get the report result but the below function is not working. Any pointers would be helpful.

Thanks,

Nishi

 

Version

Oracle Service Cloud May'17

Code Snippet

              <script type="text/javascript">
			var c = window.external.Incident;
			var resource = "<?php echo $resource; ?>";
		    	c.SetCustomFieldByName('CO$Resource',resource);
	</script>  
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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