Hello Goodnight. I new in acumatica. I have the following requirement: the phase codes field cannot be repeated.My validation already works but the data must be saved in the DB previously.
The problem is when the user enters N number of rows (without saving before) that is when my validation does not work.
This is how I currently do the validation (Row_Updated event). It works, but the data has to be saved in the DB before.
Can you help me please. I think it should take data from the grid (cache) but I don't know how to do it.
Best answer by Naveen Boga
Hi @dnaumov Thanks for you response. Long back I also tried with “PXCheckUnique” for some reason it didn’t work for me as well. Hence we have handled in event…
@eddiedaco Since this is NOT a extended graph, you need to have a logic in the override persist() code block, instead of Persist() delegate. Please find the sample code here.
Thank you! I tried to use the PersistDelegate function.
but I got this error
'FbqlSelect<SelectFromBase<CEPhaseCodes, TypeArrayOf<IFbqlJoin>.Empty>.Order<By<BqlField<CEPhaseCodes.phaseCode, IBqlString>.Asc>>, CEPhaseCodes>.View' does not contain a definition for 'cache' and no accessible extension method 'cache' accepting a first argument of type 'FbqlSelect<SelectFromBase<CEPhaseCodes, TypeArrayOf<IFbqlJoin>.Empty>.Order<By<BqlField<CEPhaseCodes.phaseCode, IBqlString>.Asc>>, CEPhaseCodes>.View' could be found (are you missing a using directive or an assembly reference?)
Also implement FieldVerify
but I got this error
'PXResultset<CEPhaseCodes>' does not contain a definition for 'PhaseCode' and no accessible extension method 'PhaseCode' accepting a first argument of type 'PXResultset<CEPhaseCodes>' could be found (are you missing a using directive or an assembly reference?)
Hi @dnaumov Thanks for you response. Long back I also tried with “PXCheckUnique” for some reason it didn’t work for me as well. Hence we have handled in event…
@eddiedaco Since this is NOT a extended graph, you need to have a logic in the override persist() code block, instead of Persist() delegate. Please find the sample code here.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.