Obtaining the Initial Data to Populate the Form

The initData variable holds the JSON data stream that will be used to populate the form when it is rendered.

 var initData = window.external.GetInitData();

The data is obtained by calling ViewWorkItem.GetInitData.

public string GetInitData()
{
   return (String)_item.payloadModel.Item;
}

_item.payloadModel.Item is the payloadModel containing the JSON data stream for the work item, obtained from the previous OpenItem call.