Symptom
Custom javascript that worked fine when an Enterprise Object was originally routed, is failing to run as expected when the in-process Enterprise Object is edited.
Reproducing the Issue
- From the Admin page within NSite, create a new Enterprise Object ( This will launch the Application Designer).
- From Application Designer's Controls panel, drag and drop a Drop Down control into the Header Area.
- Highlight the Drop Down control.
- Expand the 'Control Properties' panel.
- Set the 'Name:' property to 'ddlTest'.
- Associate the 'Data Lookup:' property with an existing Lookup that contains more than one item.
- Go to the 'Application Extensions' panel.
- Click on the 'Action Builder' link.
- Choose 'objForm' in the Select Object drop down list.
- Choose 'onLoad' from the Select Event drop down list.
- Click the 'Add Behavior' button.
- put the following code into the editor:
function form_onLoad(objForm){
//Your code goes here.
alert(document.getElementById('ddlTest').options.length);
} - Apply the changes.
- Close the editor.
- Save the Enterprise Object.
- Create a new instance of the Enterprise Object.
- Route it to a user to put the EO into an 'in progress' state.
- Note, when an instance of the EO is created, an alert will popup showing the number of items in the ddlTest drop down.
- Edit the 'in progress' routing that was just created, the alert will popup again, this time showing the number 1 instead of the original number of items in the drop down.
Cause
- The default value for the 'Routing Edits' option on a control is 'Never'.
- By default, this restricts the participants from being able to edit a field of Enterprise Object that they are sent.
Resolution
To get the drop down list populated with all of the items from the lookup:
- Edit the Enterprise Object in the Application Designer
- Select the ddlTest drop down control.
- From the Control Properties panel, click the 'builder' button beside the 'Routing Edits' label (see screenshot).
- The 'Routing Access Builder' dialog will be shown,
- Change the setting from 'Never' to 'Enable edits while routing is in progress'.
Keywords
nsite object not found in progress edit routing javascript type error undefined , KBA , BI-OD-NSI , Nsite, Quote and Proposal Management OnDemand , Problem
Product
SAP Crystal Reports XI R2