ST-GWerner:
Very good point. I've asked the dev team to alter the next build to allow custom field items to be pre-set by the GetCustomFieldOptions method. Once that's in track, you'll be able to do:
OutputVariables.Add("cf_MyCustomField=Big Joe");
Hi Grady, in a previous post you thought the pre-set field option would be included, so you know if it made it to the 3.5 beta? I've downloaded it and can't get the option to work...
If I follow your example I get a null reference error (see below) - if I drop off the "cf_" prefix when adding the output variable I get no error (which also doesn't work)...
P.S. When setting a drop down field using the previous CustomFieldDataItems.Add code you can only get it to work if you use the fields name as defined in the template section rather than the display name set under the field defination - is this by design? I would have imagined the field def. name should be consistant across all code so to allow the display name as set in the template to be able to vary...
TJ
***************** Error Info ***********************
Server Error in '/SmarterTrack' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
SmarterTrack.MRS.Main.frmNewTicket.CallCustomFieldProvider(DepartmentEntity dept, Boolean Pre, String& message) +930
SmarterTrack.MRS.Main.frmNewTicket.DepartmentNextIcon_Click(Object sender, EventArgs e) +152
SmarterTools.Web.Controls.SimpleButton.RaisePostBackEvent(String eventArgument) +58
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1546
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3031; ASP.NET Version:2.0.50727.3031