Skip to content

Commit 2a75569

Browse files
authored
Create popdatefromurl.js
1 parent 151b556 commit 2a75569

File tree

1 file changed

+8
-0
lines changed
  • Client-Side Components/Catalog Client Script/Auto-populate field from URL

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//Logic to fetch the u_date field value passed in the url and setting it in the actual field.
2+
3+
4+
var fetchUrl = top.location.href; //get the URL
5+
6+
var setDate = new URLSearchParams(gUrl).get("sysparm_u_date"); //fetch the value of date from the query parameter
7+
8+
g_form.setValue('u_date', setDate); //set the value to the actual field

0 commit comments

Comments
 (0)