Hi, i've this javascript file and it is into the companyHome->DataDictionary->Scripts for run into a Rules:// Retrieve the last DocID value from the counter at the Space level
if (parseInt(space.properties["custom:numP"]) == null)
LastDocID=0;
else
LastDocID = parseInt(space.properties["custom:numP"]);
// Generate new DocID value
NewDocID = LastDocID + 1;
// Store the new value in the space
space.properties["custom:numP"] = NewDocID;
space.save();
// Store the DocID in the document's metadata
document.properties["custom:numeroP"] = NewDocID;
document.save();
alert("Doc saved");After create the rules that run the script "Execute javascript" i've see this message:The rules have been successfully reapplied.
A system error happened during the operation: Transaction didn't commit: Failed to execute script 'workspace://SpacesStore/f4777eb8-fd9c-4591-b9b1-6b2c88109bfe': ReferenceError: "alert" is not defined. (AlfrescoScript#16)
CAN YOU HELP ME?THANKS