When creating a script object in LiveCycle for a PDF form, the script object is empty at first, so you must build it by inserting functions within that script object.
So if you look inside the objReset script object in my form, you can see that there is code in there, by copying the content of the script object and pasting it in the script object you created in your form, you will be able to access the objReset.getFields() function.
Make sure that the script object you have created in your PDF form has the name objReset!
As I said I have no JS knowledge so please go easy on me
From studying your form and specifically the "Reset all but Specific Fields"- button, it seems i need to add a script object in my form on the form level and name it "objReset" (seems easy enough) but I am not sure what you mean with : "inserted the function accordingly in the object as well?"
unfortunately, I doubt xfa.form.remerge can remerge part of the form only..
If you use the functions I provided in my form, the script object objReset contains functions to retrieve all objects withing a part of the form. you can call only the function xfa.host.reset with a function within that script object to have your form remerged.. use the functionality with the following :