Edit Button Not Working in Detail View

Edit Button Not Working in Detail View

Hi Support,

Please advise why Edit button didn't work in all of the detailed views of the record. It open the form but after the change to the record, it won't update the record. The application, Signal Auditing Demo, is already shared to Support for view & eidt. I would also like the form to close automatically after the update is made to the record. I've attached a screen shot of the detail view.
This is the script for the button in the detailed view:
form detailed_buttons
{
store data in zc = false

Contractor_ID
(
displayname = "-"
type = picklist
values = Contractors.ID
)

Event_ID
(
displayname = "-"
type = picklist
values = Events.ID
)

Client_ID
(
displayname = "-"
type = picklist
values = Clients.ID
)

Establishment_ID
(
displayname = "-"
type = picklist
values = Establishments.ID
)

Email_ID
(
displayname = "-"
type = picklist
values = Sub_Emails.ID
)

actions
{
on load
{
hide Contractor_ID;
hide Event_ID;
hide Client_ID;
hide Establishment_ID;
hide Email_ID;
}
Edit
(
type = button
displayname = "Edit"
on click
{
if (input.Contractor_ID != null)
{
openUrl("#Form:Contractors&appLinkName=" + zoho.appname + "&compType=2&formAccessType=3&formLinkName=Contractors&recLinkID=" + input.Contractor_ID + "&viewLinkName=Contractors&viewID=-11", "popup window", "height=400,width=400,closeButton=no, closeOnBodyClick=no");
}
else if (input.Event_ID != null)
{
openUrl("#Form:Events&appLinkName=" + zoho.appname + "&compType=2&formAccessType=3&formLinkName=Events&recLinkID=" + input.Event_ID + "&viewLinkName=Events&viewID=-11", "popup window", "height=400,width=400,closeButton=no, closeOnBodyClick=yes");
}
else if (input.Client_ID != null)
{
openUrl("#Form:Clients&appLinkName=" + zoho.appname + "&compType=2&formAccessType=3&formLinkName=Clients&recLinkID=" + input.Client_ID + "&viewLinkName=Clients&viewID=-11", "popup window", "height=400,width=400,closeButton=no, closeOnBodyClick=yes");
}
else if (input.Establishment_ID != null)
{
openUrl("#Form:Establishments&appLinkName=" + zoho.appname + "&compType=2&formAccessType=3&formLinkName=Establishments&recLinkID=" + input.Establishment_ID + "&viewLinkName=Establishments&viewID=-11", "popup window", "height=400,width=400,closeButton=no, closeOnBodyClick=yes");
}
else if (input.Email_ID != null)
{
openUrl("#Form:Emails&appLinkName=" + zoho.appname + "&compType=2&formAccessType=3&formLinkName=Emails&recLinkID=" + input.Email_ID + "&viewLinkName=Emails&viewID=-11", "popup window", "height=400,width=400,closeButton=no, closeOnBodyClick=yes");
}
}
)
Deleted
(
type = button
displayname = "Delete"
on click
{
if (input.Contractor_ID != null)
{
delete from Contractors[ ID == input.Contractor_ID ];
openUrl("#View:All_Contractors_List", "same window");
}
else if (input.Event_ID != null)
{
delete from Events[ ID == input.Event_ID ];
openUrl("#View:Events", "same window");
}
else if (input.Client_ID != null)
{
delete from Clients[ ID == input.Client_ID ];
openUrl("#View:Clients", "same window");
}
else if (input.Establishment_ID != null)
{
delete from Establishments[ ID == input.Establishment_ID ];
openUrl("#View:Establishments", "same window");
}
else if (input.Email_ID != null)
{
delete from Sub_Emails[ ID == input.Email_ID ];
openUrl("#View:Emails", "same window");
}
}
)
}
}