Hello all, I am having an issue where the textbox I have linked to a UD field is being forced to be read only. The field is only locked when the Engineered checkbox is checked.
After a bit of looking I found that everything on JobHead locks when this checkbox is selected.
However, this field is on a separate UD table so I’m confused as to why it’s being set to read only as well. Is there any way to force a single UD field to be not read only when Engineered is selected?
Also It is to my understanding that it is probably possible to “fix” this in company configuration by allowing changes on engineered jobs. We need to keep prevent changes on, I just need this one field to be able to be edited by the users.
Yes. The UD fields come in with the dataview, and are treated as part of the original table.
There are a few places in E10 where a header field is still accessible even when the header is “locked”. For example, the Tracking number field of a ShipHead record is still accessible even after the packer is marked shipped (which sets all other ShipHead related fields to read only).
Have you tried the Extended properties wizard in the customization?
Yeah I just tried a few things I though would work, and none did …
I guess I’ll have to put the bat-signal out for @josecgomez…
How does one enable a UD field in a “locked” dataview on a form?
Like if I had OrderHed.Notes_c field on the Order Entry form. As soon as the Order is closed, that control becomes disabled and/or read only. Want to be ablt to change the Notes_c field of a closed order.
Or does the order being closed prevent any changes to the OrderHed DB record?
BAHAHAHA… @ckrusen I’m trying to do that myself on a different form with @Banderson and… let me tell you we went down the deepst rabbit hole and have yet to be successful…
You could try this (which works on Posted Invoice Update)
So the gist of the below is look at all the RowRules in the DataView, find the one which disables everything, update the “except” array to include the custom fields you want.
I have to check, which one of this worked on Quote Entry, I do have one… That’s where I found out about the SetRowProperty, back in 10.1.400 – not sure if it still works in 10.2.600… Not even sure if it was the control or RowProp…
So I tried this again @hasokeric, and it still didn’t work. Does this work for you on a quote form? There are some CSG customizations that are in there, so I don’t know if that’s affecting us or not.
@Banderson Similar code to the above works for me on 10.2.400.9 on Opportunity / Quote Form:
// This Epi View Notification is for catching any new/updated records in the PriceBreak (QuotyQty) grid
private void edvQuoteQty_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
{
// React to updates on the PriceBreak table and ensure it is ReadOnly if Configured Part
// ** 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
// Next line commented as I want to react to changes in this grid.
// if ((args.NotifyType == EpiTransaction.NotifyType.AddRow)) // Always do this :)
{
if ((args.Row > -1))
{
try {
SetRoForUnitsAndPrice((Convert.ToString(txtIsConfiguredPart.Value)=="On"?true:false));
this.txtIsConfiguredPart.Visible = false; // Keep my config part field hidden during view updates
}
catch (System.Exception ex)
{
ExceptionBox.Show(ex);
}
}
}
}
// This is to catch new Quotes and set the Default Event value
// ** 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.Initialize) || (args.NotifyType==EpiTransaction.NotifyType.AddRow))
{
if ((args.Row > -1))
{
if (Convert.ToString(edvQuoteHed.dataView[edvQuoteHed.Row]["MktgEvntSeq"])=="0")
{
edvQuoteHed.dataView[edvQuoteHed.Row]["MktgEvntSeq"]=1;
edvQuoteHed.Notify(new EpiNotifyArgs(oTrans,edvQuoteHed.Row,edvQuoteHed.Column));
}
this.txtIsConfiguredPart.Visible = false; // Keep my config part field hidden during view updates
}
}
}
private void SetRoForUnitsAndPrice(bool bIsConfigured)
{
// This method takes the arrray { bypassGroups } defined above checked against user's security groups.
bool bReadOnly = true;
if ((bAuthedBypass(bypassGroups)) || (!bIsConfigured )) bReadOnly=false;
// Columns to set RO when part is configured
string[] aQuoteDtlCols = { "OrderUnitPrice"
, "ExpUnitPrice"
, "DocExpUnitPrice"
, "InExpUnitPrice"
, "DspExpUnitPrice"
, "DocInExpUnitPrice"
, "DocDspExpUnitPrice" };
string sEugQuoteQtys = "b4888395-8a78-4e5b-bd43-63b324f1f4b5"; // Guid for eug QuoteQty
foreach (string ugCol in aQuoteDtlCols)
{ if (edvQuoteDtl.dataView.Table.Columns.Contains(ugCol))
{
edvQuoteDtl.dataView.Table.Columns[ugCol].ExtendedProperties["ReadOnly"]=bReadOnly;
}
}
((EpiUltraGrid)csm.GetNativeControlReference(sEugQuoteQtys)).ReadOnly=bReadOnly;
}
The Quoted Date Fields you could debug, those are Epicor fields and see how they mark them avail when Quoted = true
But id like to see if I can make a RowRule with a custom condition and check for, but the problem might be that Epicor themselves are not using RowRules but just the helper to disable all controls…
Ideally something like this id like to see, i’ll need to poke around.
bool QuoteHed_CustomRuleCondition(Ice.Lib.ExtendedProps.RowRuleDelegateArgs args)
{
// oTrans does have this
return oTrans.QuotedAndPreventQQChange;
}
@josecgomez remember how you set a Custom Color… Epicor also lets you set state of the control, I did this on a dashboard I need to find it where the entire Row was disabled, but certain columns were enabled. #foodforthought