Solved

Error in value of GetExtension code

  • 22 December 2020
  • 2 replies
  • 571 views

Userlevel 2

Hello,

 When I set the value of GetExtension, the variable gets null.         

 foreach (SOLine soline in listOfLine1)
            {
                SOLine line = new SOLine();

                //…. code

                var lineExt = SOGraph.Transactions.Current.GetExtension<Objects.SO.SOLineExt>();

                lineExt.UsrMargeLine = GetPercentMargin(line);

                SOGraph.Transactions.Insert(line);
                SOGraph.Actions.PressSave();

            }


Best regards.

icon

Best answer by Naveen Boga 22 December 2020, 11:54

View original

2 replies

Userlevel 7
Badge +17

Hi @mohamed1walha 

Can you please add this line of code and verify

SOLineExt lineExt = Base.Transactions.Cache.GetExtension<PX.Objects.SO.SOLineExt>(line);

Hope this helps!!

Userlevel 2

thanks @Naveen B  for your answer, i will test with it.

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