Custom types, Scripts and Rules
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2008 12:02 PM
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. 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
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2008 10:34 AM
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.
