E10- Set value to EpiDateTimeEditor

How to set value to EpiDateTimeEditor using customization.

EpiDateTimeEditor dteDueDate = (EpiDateTimeEditor ) csm.GetNativeControlReference(“22c6c5cd-9902-4ded-99f4-184b71a6e7be”);
dteDueDate.Value = DateTime.Now.Date;

Set the value on the dataview not the control. You should avoid setting or getting values from control in Epicor.


I have Add a customize EpiDateTimeEditor in Purchase Order. So that, I want to set some default value to this
EpiDateTimeEditor .

Is it bound to a dataview? If so same principle applies.

Say the OP did:
(warning, untested code to follow)

	EpiDataView testView = (EpiDataView)(oTrans.EpiDataViews["_dataviewName_"]);//gets your data view
	testView.dataView[testView.Row]["DueDate"] = _your_value_here_;  //sets the value new value of the DueDate
	testView.dataView[testView.Row]["RowMod"]="U"; // sets the row mod so that it knows it's upated
	testView.Notify(new EpiNotifyArgs(oTrans, testView.Row , testView.Column)); //triggers the change so it goes to the server to do the work

How would the _your_value_here_ be formatted/cast for a datetime?

Just assign a datetime object
DateTime.Now for example