Asset Importer Configuration Bind
The Asset Importer Configuration bind is used to create / update asset content with new file content using an Asset Importer Configuration. The bind can be found within the 'Binds to' dropdown, as shown below.
For details and available methods, refer to the Technical Documentation, available at [system]/sdk or accessible from the Start Page, and click the Javadoc 'html' link under the 'Scripting API' section.
Configuration
To use any bind:
-
Create a business rule as defined in the Creating a Business Rule, Function, or Library topic.
-
Edit the business rule as defined in the Editing a Business Rule or Function topic.
-
In the Edit Operation dialog, add the bind to a business rule, as defined in the Adding a Bind topic.
-
In the Edit Operation dialog, optionally add Messages, as defined in the Localized Messages for JavaScript Business Rules topic.
-
In the Edit Operation dialog, add JavaScript to call the bind.
Example
The following is an example JavaScript that uses this bind.
Important: Example scripts should not be used as-is without thorough testing, including updating the script to match object and link types that exist on your system. JavaScript variable names are case-sensitive.
In the example below, the existing asset is updated via the Asset Importer Configuration so that the asset will be passed through all the steps of asset import configuration.
assetImporterConfig.upload(asset.getID()+'impconfig',asset.download(), asset.getValue("asset.filename").getSimpleValue());
Note: The following functionality is managed by configuration properties that are not available in the Self-Service UI. Contact Stibo Systems Support for assistance. Available characters and file extensions for 'Asset.FileName' can be controlled via two configuration properties: 'Asset.FileName.LegalCharacters', which determines what characters are allowed to appear in an uploaded asset filename, and 'Asset.FileName.LegalExtensions', which dictates what file extensions can be used.