Lawson AGS Caching

If you’ve done much work at all with Lawson AGS calls, you’ve no doubt noticed the _CACHE property.  Ever wonder what it does?

Simply put, if you set the _CACHE property to true, you can make subsequent AGS calls to update a single field without having to pass back all of the values on a form.  This is extremely useful for forms that have a lot of fields and you just want to change one or two.  Something like GL10 (GL Company setup) that has hundreds of fields, but you only want to change the company description.

Note: this is not necessary for all forms because some forms implicitly only require the fields you are changing (like PA52).

So how to use the _CACHE property?  First you inquire on the form with caching, get the _TRANSID that is returned to you, and then pass back the fields that you want to change.

In this example, we’re going to be using the PO25.6 screen.  For those unfamiliar with this screen, it is the Vendor Agreement Line form where we can maintain the lines of an Agreement (Vendor contract).  There are 126 detail fields on the screen.   All we want to do is execute a change on the line.  We don’t even want to change anything *.


Response looks like:

<?xml version="1.0" encoding="ISO-8859-1" ?> 

Change Call (to make a change to line 44 with no value changes)


<?xml version="1.0" encoding="ISO-8859-1" ?> 
<_f4 /> 
<_f5 /> 
<Message>Change Complete - Continue</Message> 

Wasn’t that easy?

*We actually use this as part of a process flow that runs every day.  We do this because we’re on 9.0 apps and when a change is made to the date on the agreement header, it doesn’t propagate to the lines.  All that’s necessary is to go to the PO25.6 and make a change on the line without changing any data (you can’t change the date anyway, it’s a calculated field), but the users seem to find this too tedious.  Imagine that.

UPDATE — Part 2 is here



  1. I love this and have used it in vb and javascripts. I have not figured out how to capture the _TRANSID field in process flow. when I try Transaction1234_fieldname it does not like it because of the _ in front of TRANSID. I have also tried performing the functions as a webrun and parsing the result to get the _TRANSID which works but then when I try to input this into the second transaction it ignores it and gives a different _TRANSID in the response. I’m guessing it has something to do with how a webrun opens and closes it’s web call?? Any suggestions?

    1. The fact that _TRANSID is not available as a result from the AGS call in processflow (or LPA) has nothing to do with the underscore. I’m not sure what the correct term is, but any of the elements related to the service itself are not returned like _PDL, _TKN, etc. The fact that FC is not returned either proves that the underscore is not the issue. We’re on LPA and it’s been a while since I’ve tried to do this on Process flow, but if I recall correctly –
      1) Run your WebRun
      2) Pass the XML result into an Assign Node and replace the period (.) in the root node and _TKN element
      3) Parse the resulting string from the Assign node in an XML node
      4) Update the XML object with another assign node to whichever values you need to change – be sure to change the action from Inquire to Change, etc – OR – Build a new AGS call string from the xml output
      5) Either run a WebRun with the XML output or and AGS call with your string

      For the basic concept of the flow (excluding the _CACHE) see this post.

  2. Thanks for sharing your ideas.
    I have difficulty in getting TRANSID from the Transection Node or Webrun call. Can you share with me a sample flow which show how you are utilizing the TRANSID to update the form?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s