Skip to main content

Hello,

 

Can we use the viewBag in Acumatica?

or pass a value for example from Graph CAEntry to CAReleaseProcess 

 

Thanks.

Hi Sadok,

Can you tell us more about the requirement and process? There are different ways to pass state between graphs, but using a ViewBag is not possible.


Hi @SadokHanini We have used sessions long back, please find the code below.. that may help you.

 

Store the value in session:

PXContext.Session.SetString( TOKENConstant , tokenIDvalue);

Read the value from Session:

string tokenID = PXContext.SessionsTOKENConstant].ToString();

 


@Naveen B I personally think using session state is almost always the wrong solution -- take a look at the business logic in PX.Objects.dll; this is never used except for very very specific cases.


Yes @Gabriel Michaud  We have used this session concept long back for specific reason in payment gateways, and currently we are NOT using it.

Since Sadok is looking for the Sessions, I just shared here.


I have no doubt you know what you are doing @Naveen B, and payment processing is one of the scenarios where I see it used in PX.Objects 😉

The reason I mentioned it is because there are new users on this forum and they often try to replicate the same patterns they used in other systems without first getting a good understanding of how to do things the “Acumatica way”. This always comes back to bite you later and you discover issues that require major redesigning


Reply