Question

I set value to custom field but it's not save until I change ui and save


Userlevel 3
Badge

this is my code in open opportunity screen. I can get on screen but it doesn’t save until change value in ui. if I don’t change any value on screen and leave the screen, the data is gone

 


5 replies

Userlevel 1

Have you tried setting the value like this?
Base.Opportunity.SetValueExt<CROpportunityExt.usrExtArea>(row, contactExt.UsrExtArea);

Userlevel 2
Badge

Have you tried using the following code?

Base.Actions.PressSave(); instead of Base.Save.Press();

Badge +11

I don’t see any issues with your code. There are multiple ways you could be doing it, but it looks fine to me. I wonder if you’re not fighting the workflow engine, since the Open action is a workflow action. Have you tried executing the baseMethod before your code?

public IEnumerable open(PXAdapter adapter, openDelegate baseMethod)
{
var row = Base.Opportunity.Current;

var result = baseMethod(adapter);

// Your code

return result;
}

 

Userlevel 3
Badge

thank you all I solve it. 

Userlevel 7
Badge

Hi @vannakheng66 , Can you share how you solved it? Thank you!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved