Untick checkbox when custom checkbox is ticked

Hi All,

I have a custom check box on customer screen on the ship to Tab to mark the obsolete ship to addresses as inactive. This then filter the search results in ShipTo search. The other functionality I wish to have is to untick Primary check box when address is marked as inactive. I have used an event wizard but I do not know how to access the Primary ship to checkbox from here. Should I use EpiDataView or can I change the control propertie Checked to false somehow?

Please help.

Regards
Aleksander

private void chkInactive_Click(object sender, System.EventArgs args)
{
if(chkInactive.Checked)
{
/if(PrimaryShipTo == true)
{
PrimaryShipTo = false;
}
/
}
}

i think you would have to create a bpm to do that

Hi Nathaniel,

Do you mean like pre processing on salesorder.update method or you meant something more advanced?

Kind regards
Aleksander

If you are doing it in the form customization, probably want to change the value of the field in the EpidataView. You’ll have problems if you try to changing a value thru the control properties.
You might find some examples if you search for .BeginEdit

A BPM should work too.

Either way, you’ll probably want to make sure the from refreshes after your value is changed.

To get the existing checkbox - look up its GUID in the control properties.

Then you use something like this:
EpiCheckBox cb = (EpiCheckBox)csm.GetNativeControlReference(“the guid here”);

As was mentioned already, accessing this value directly may not give the intended results.

You can also access the related EpiDataView. Here some code I’ve used in one of my situations:

EpiDataView edvRQ =  (EpiDataView)(oTrans.EpiDataViews["RQ"]);
edvRQ.dataView[edvRQ.Row]["CurrentQty"] = QtyEdit.Text;
oTrans.LastView = edvRQ;
oTrans.LastControl = QtyEdit;
oTrans.focusLast();
2 Likes

Thank you Bruce, Chris!

Big Big Thank you.

Alek