如何在Acumatica中实现会话变量? [英] How can I implement a Session Variable in Acumatica?

查看:34
本文介绍了如何在Acumatica中实现会话变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Acumatica中有一个处理页面,该页面执行验证。当我们运行此过程,然后切换到另一条记录以再次执行该过程时,我们不想每次都重新运行验证。因此,我需要可以设置的BLC范围之外的东西(例如标志),并将保持设置直到Session或Page过期。我该怎么做?

I have a processing page in Acumatica that performs a Validation. When we run this process, then switch to another record to perform the process again, we don't want to rerun Validation every time. So, I need something outside of the scope of the BLC (like a flag) that I can set and will keep set until the Session or Page expires. How can I do this?

推荐答案

您可以使用 PXContext.Session.SetString(key,value) ; 设置会话中的字符串值。然后 PXContext.Session [key] 检索值。

You can use PXContext.Session.SetString(key, value); to set string value in the session. And PXContext.Session[key] to retrieve value.

这篇关于如何在Acumatica中实现会话变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆