The CreatorCon Call for Content is officially open! Get started here.

How to populate fields using url

Alon Grod
Tera Expert

Hi,

This is my instance url for the 'Create Incident' record producer in the portal. How can I populate the fields service_offering and business_service using the url?

http://my_instance_url/esc?id=sc_cat_item&sys_id=3f1dd0320a0a0b99000a53f7604a2ef9

6 REPLIES 6

Share me what did you try and whats your business requirement ? 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

Sohithanjan G
Kilo Sage

Hi @Alon Grod ,

 

You can add in url like this. Replace with original sysids if reference. 

http://my_instance_url/esc?id=sc_cat_item&sys_id=3f1dd0320a0a0b99000a53f7604a2ef9&sysparm_service=435bjkhb435kjb5kjb43jkb5kj4&sysparm_business=j5bj345jkjk32kjlnb2j3pojkh23gf;

& with onload client script you can populate

function onLoad(){

	var url = top.location.href;
	var userName = new URLSearchParams(url).get("sysparm_service");
	var userEmail = new URLSearchParams(url).get("sysparm_business");

	g_form.setValue('service_offering',sysparm_service);
	g_form.setValue('business_service',sysparm_business);

}

 

 

Please mark as Accepted Solution if this solves your query and HIT Helpful if you find my answer helped you. This will help other community mates too..:)