Module - URL (from Arguments): create new record with default values, specific view

Jamsta1912
Tera Guru

Hello all,

I am trying to create a module to open a new record, in a specific view, with some field values set to defaults.

I have created the view 'My View', and I'm able to change the view manually on existing records, to this new view.

The arguments field in my module definition is set to:

u_mytable.do?sys_id=-1&sysparm_view=My View

When I click the module, a new record is opened but the view shows as: [null view].

Any thoughts on this?

Ultimately I'd like to be able to set some other fields on the new record to defaults, by setting the arugments field to someting like this:

u_mytable.do?sys_id=-1&u_myfield=Blah&sysparm_view=My View

More generally, is there any documentation available detailing the various options for sysparms in URLs (for lists and for single records).

Thank you

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron
Hi, I have used this format in the past. my_table.do?sys_id=-1&sysparm_stack=my_table_list.do?sysparm_query=active=true&sysparm_query=my_field=my_value_or_sys_id^my_field=my_value_or_sys_id&sysparm_view=my_view_name

View solution in original post

2 REPLIES 2

Tony Chatfield1
Kilo Patron
Hi, I have used this format in the past. my_table.do?sys_id=-1&sysparm_stack=my_table_list.do?sysparm_query=active=true&sysparm_query=my_field=my_value_or_sys_id^my_field=my_value_or_sys_id&sysparm_view=my_view_name

Thank you Tony. This is working for me 🙂