AnsweredAssumed Answered

Need some help with declaring records

Question asked by alaa on Dec 31, 2009
Latest reply on Dec 31, 2009 by alaa
Hi!

I would like to automate the process of declaring a record:
when you upload a file in the folder, it's marked as undeclared record. you have to fill in some mandatory metadata so you that the action 'declare as record' will be available.
What I tried to do is to create tow actions: the first one is to execute a small javascript that will set the record's mandatory metadata, the second one is the built in 'declare record' action. the whole thing didn't work. I got a failure message when I try to upload the file into the folder.

If I use only the first action with the javascript,  the record's mandatory metadata is set but the action 'declare as record' is still is not available.

here is the javascript I used

document.properties["rma:originator"]="Originator";
document.properties["rma:originatingOrganization"]="Originating Organization";
document.properties["rma:publicationDate"]=new Date("12/29/2009");
document.save();

Is there something wrong with what I did?
Is there a better way to this?
Any thought is welcome. Thanks.

Outcomes