New Misc Header Charge on Button

We are now working with Automated Logistics (ALS) and my project manager would like me to create a button on the quote entry screen that creates a new line. This new line would always have the same information on it.

Shipping & Handling | $40.00

I can’t figure out how to create the line using a button. Could anyone point me in the right direction or give me an example of how to create a new line in C#? I tried doing a little digging but only found 1 post and it was VB.

If a BPM would be easier, I can go that route with a little help. I’m not familiar with BPM unfortunately.

Any help or advice is greatly appreciated, thank you!

Header level or Line level you want to add this line?

This would be a Misc Header Charge

So far this is what I’ve tried:

	private void btnsh_Click(object sender, System.EventArgs args)
	{
		// ** Place Event Handling Code Here **

	EpiDataView qMsc = (EpiDataView)oTrans.EpiDataViews["QuoteMsc"];
	oTrans.GetNewQuoteHedMsc();
	
	if(qMsc.Row > -1)
		{

		
		qMsc.dataView[qMsc.Row].BeginEdit();
		qMsc.dataView[qMsc.Row]["MiscCode"] = "SHIP";
		qMsc.dataView[qMsc.Row].EndEdit();

		}

	oTrans.Update();
	
	}

It creates the line but I can’t get it to populate with any data.

Did you do a trace for everything you would do manually? You’re going to want to follow the methods that show up there to make this work.

I guess now would be a good time to test out the Trace Parser that Jose came up with lol. I’ve tried running and using traces in the past but struggle to read them.

1 Like

Apparently I was extremely close, I had the EpiDataView wrong.

It was

EpiDataView qMsc = (EpiDataView)oTrans.EpiDataViews["QuoteHedMsc"];

I was missing Hed

2 Likes