Hi @Naveen B I removed the code but i have the same error.\App_RuntimeCode\BidLevelingMaint.cs(15): error CS1061: 'BidLevelingMaint' does not contain a definition for 'CEBidLevelingItem' and no accessible extension method 'CEBidLevelingItem' accepting a first argument of type 'BidLevelingMaint' could be found (are you missing a using directive or an assembly reference?) using System;using PX.Data;using PX.Data.BQL.Fluent; //se agrega esta lineausing System.Linq;namespace Estimating{ public class BidLevelingMaint : PXGraph<BidLevelingMaint, CEBidLeveling> { protected virtual void CEBidLeveling_Vendor_1Total_FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e) //protected virtual void _(Events.FieldUpdating<CEBidLeveling, CEBidLeveling.vendor_1Total> e) { CEBidLeveling row = (CEBidLeveling)e.Row; if (row == null) return; decimal? Vendor1Total = this.CEBidLevelingItem.Select().FirstTableItems.ToList().Select(x => x.Vendor_1TotalAmou
Hi, @Naveen B thanks for your aclaration!.I changed Base to this.using System;using PX.Data;using PX.Data.BQL.Fluent; //se agrega esta lineausing System.Linq;namespace Estimating{ public class BidLevelingMaint : PXGraph<BidLevelingMaint, CEBidLeveling> { protected virtual void CEBidLeveling_Vendor_1Total_FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e, PXFieldSelecting InvokeBaseHandler) { InvokeBaseHandler?.Invoke(sender, e); CEBidLeveling row = (CEBidLeveling)e.Row; if (row == null) return; decimal? DiscTotal = this.CEBidLevelingItem.Select().FirstTableItems.ToList().Select(x => x.Vendor_1TotalAmount).Sum(); e.ReturnValue = DiscTotal; } But i have this error.\App_RuntimeCode\BidLevelingMaint.cs(15): error CS1061: 'BidLevelingMaint' does not contain a definition for 'CEBidLevelingItem' and no accessible extension method 'CEBidLevelingItem' accepting a first argument of type 'BidLevelingMaint' could be found (are you m
@Naveen B tanks for your help. I got this error. (Sorry i´m new)I show my code and I am putting it in my graph (I don't know if it should be put there). Aditional: I created a new customization. protected virtual void CEBidLeveling_Vendor_1Total_FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e, PXFieldSelecting InvokeBaseHandler) { InvokeBaseHandler?.Invoke(sender, e); CEBidLeveling row = (CEBidLeveling)e.Row; if (row == null) return; decimal? DiscTotal = Base.CEBidLevelingItem.Select().FirstTableItems.ToList().Select(x => x.Vendor_1TotalAmount).Sum(); e.ReturnValue = DiscTotal; }
Thanks @Naveen B for the answer. I resolve the problem using the new event declaration. protected void _(Events.FieldUpdated<CEBidLeveling, CEBidLeveling.internalBudgetChecked> e) { var row = (CEBidLeveling)e.Row; if(row.InternalBudgetChecked==true) { row.Vendor_1Checked =false; row.Vendor_2Checked = false; row.Vendor_3Checked = false; row.Vendor_4Checked = false; } }and set the commit changes property = true. for some reason my acumatica version doesnt recognize the normal event declaration.
@Naveen B Thank you very much, I check it these days
Hi @eddiedaco, Good Morning !! This validation you need to handle in FeildVerifying and Perisist delete(). Please find the code sample below. public delegate void PersistDelegate(); [PXOverride] public void Persist(PersistDelegate del) { if (Base.BAccount.Current != null) { int count = 0; List<string> liColors = new List<string>(); foreach (DACName rec in ViewName.cache.Cached) { if (liColors.Contains(rec.LevisColorID)) { count = 1; break; } else liColors.Add(rec.FiledName); } if (count >= 1) { throw new Exception("Duplication record not allowed.Please review."); } } del(); } protected virtual void DACName_FieldName_FieldVerifying(PXC
There actually already is implementation of the needed logic in Acumatica. You can put PXCheckUnique attribute on the field in the DAC and it will verify the uniqueness of the field. Here is example code: public abstract class description: PX.Data.BQL.BqlString.Field<description> { }[PXDBString(200,IsUnicode = true)][PXUIField(DisplayName = "Description")][PXCheckUnique(typeof(CustomDAC.description))][PXDefault]public virtual string Description{ get; set;} @dnaumov Thank you so much. I add the property to my field but it still allows inserting repeating fields.
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.