Add an element to a form by a Custom Action

Add an element to a form by a Custom Action

Hi,
in one of my form I have a Custom Action which open a report where some fields are pre-filled (based on the record selected) and there are others that the user should fill. 
When I press the "submit" button, it adds the fields in the correct form but the report remains open and not closed.

I followed this guide:  https://www.zoho.com/creator/help/views/editing-records-via-record-id.html

My URL is the following:     
sURL = (((" https://creator.zoho.com/" + zoho.adminuser) + "/") + zoho.appname) + "/#Form:frmOrderedProducts?recLinkID=" + lastElement.ID + "&viewLinkName=rptOrderedProducts";

Thanks in advance for any help or suggestions!