Unable to cast object of type

Hey All,
I am attempting to grab the value out of a combo (dropdown) that contains the customer group, but keep getting a cast error. If anyone has any ideas on what I’m doing wrong and could tell me that would be awesome. Thanks!


New user so I could only upload on image so I combined the code and the error message.

Change

EpiCombo CustBox = (EpiCombo)csm....

to

Erp.Adapters.Controls.CustGrupCombo CustBox = (Erp.Adapters.Controls.CustGrupCombo)csm...
3 Likes

Awesome, that did it. Thanks for the help.

I’m getting an error on this after I changed it. Do you know what assembly reference to use?

private static Erp.Adapters.Controls.CustGrupCombo cboGroup;

	Erp.Adapters.Controls.CustGrupCombo cboGroup = (Erp.Adapters.Controls.CustGrupCombo)csm.GetNativeControlReference("9d00f233-73d9-4eeb-a598-d39351f77170");

What is the exact error you are getting?