cancel
Showing results for 
Search instead for 
Did you mean: 

Custom types, Scripts and Rules

tfpadilla
Champ in-the-making
Champ in-the-making
I will try to explain my problem:

1. I have created a custom type of content.
2. It has several custom properties: Only some of them are mandatory ( shown in edit mode in the section modifying properties on uploading the file)  and the others ( not shown in edit mode) are calculated from the values of the mandatory ones.
3. The way of calculating those properties is via a script triggered by a inbound rule.

And now my problem: The inbound rule runs BEFORE the mandatory properties are assigned ( IN THE SAME PROCCESS OF UPLOADING THE FILE) and the result is that for my script all the properties are "null".

Could anyone help me before going to beach??????

Thanks a lot in advanced,
Teresa
1 REPLY 1

jbarmash
Champ in-the-making
Champ in-the-making
I'd suggest to try to run the script on update, or to configure a content handler that would allow to do this.  See example of this in the records management module - behaviour-context.xml configures several javascript content handlers that perform some actions.    I believe the configuration and file related to onCreateChildAssociation_rmaFilePlan_cmContains.js does similar stuff to what you need - it allows the user to upload the file, and then pre-pends the filename with some IDs.