Override default value in form customization after click new

I try to override the default rate type once click new.
I’ve tried BPM and form customization, but both of these only take effect after I click on the drop down.
Is there any way that I can do, so that once the user click ‘New’ and the rate type will change?
Any help or suggestions would be appreciated.

Thanks in advance.

Video demonstrate:
https://greatechintegration-my.sharepoint.com/:v:/g/personal/wjteoh_greatech-group_com/Ee-lhm15eAREr0kRwjJyxmsB9MCPtY4YsxeTnrcbLof8tg?e=iMrbl8

    	private void edvAPChkGrp_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
{
	// ** Argument Properties and Uses **
	// view.dataView[args.Row]["FieldName"]
	// args.Row, args.Column, args.Sender, args.NotifyType
	// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
	if ((args.NotifyType == EpiTransaction.NotifyType.AddRow))
	{
		if ((args.Row> -1))
		{
			
			view.dataView[args.Row].BeginEdit();
			view.dataView[args.Row]["RateGrpCode"] = "PRATE";
			view.dataView[args.Row].EndEdit();

		}

	}
}

I feel that you are updating the dataView and not the Drop Down itself.
Try accesing the Drop down and set the value (the value should be a valid value). Also, try setting the value under the ToolClick Event instead of EpiView.

updating the dataview is the right thing to do. In Epicor you want to stay away from modifying the control values directly as much as possible

Post processing on get new should do it, however there is likely also a description field that also needs to be updated in the bpm

That failing you could call refresh on the drop down to force it to load all the possible values on an AfterAdapterMethod call

myCombo.ForceRerfreshList();

But you shouldn’t have to

Solutions are based on requirements, wjteoh asked to change the DD values on New and a solution is suggested on it accordingly But Yes, proper validation is required.

There are still best practices based on the design and architecture of the platform.
It is important to make those distinctions

Adhering to best practice ensures maintainability, stability and upgrade ability of a solution

2 Likes