We can insert a record using GlideRecord and Encoded query.

 

var query ="category=Hardware^priority=1";
gr = new GlideRecord('incident');
gr.applyEncodedQuery(query);
gr.insert();