PreSaveAction function will validate all fields but after validation it will either save the data or redirect but it will not do the both, it should save the data and then redirect to other page.
else if (TransportType == "")
{
alert("Transport Type cannot be blank");
return false;
}
else
{
return true;
//parent.window.location.href=parent.window.location.href;
}
here in the above code either i can place return true - which saves the data but dont close the window after saving. OR i can use window.location - which can redirect but dont save the data. m using this script in SharePoint2013
Aucun commentaire:
Enregistrer un commentaire