cancel
Showing results for 
Search instead for 
Did you mean: 

Need some help with declaring records

alaa
Champ in-the-making
Champ in-the-making
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.
2 REPLIES 2

fpp
Champ in-the-making
Champ in-the-making
Try checking the aspects and meta data with the node browser (explorer / admin console) when you're applying them via your script against a manually created record.

alaa
Champ in-the-making
Champ in-the-making
Thanks for the reply!
It works know!? And I didn't change anything!
I just restarted the alfresco server. that' weird.
Thank you anyway.