DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Adding Parameters To Status Control With Dynamic "Initiate A Process" Or "Administrative Form" Drill-down

11.01.2010
| 1307 views |
  • submit to reddit
        // description of your code here

var oForm = Bpm.UI.FormManager.get_current();

// get a reference to the Status Field
var staDynamic = $find("staDynamic");

if (staDynamic)
{
     // create an object that represents a paramValue object
     var oParam = new Object();
     oParam.Dynamic = false;
     oParam.Name = "txtParentFolderId";   // this is the FIELD on the calling form
     oParam.Type = "Text";                // this is the type of FIELD on the calling form
     oParam.Value = oForm.folderId;       // this is the value that will be passed to the FIELD on the calling form

    // Add the new object to the collection of parameter values
    staDynamic.paramValues[0] = oParam;
}