Attachments in LSO

 3 Replies
 0 Subscribed to this topic
 11 Subscribed to this forum
Sort:
Author
Messages
sVaye
Basic Member Send Private Message
Posts: 10
Basic Member
Has anyone been able to work with attachments in LSO? With Portal I could use writeattachrec and getattachrec, but I haven't been able to work with Attachments in LSO so far.
Karin
Veteran Member Send Private Message
Posts: 57
Veteran Member
In LSO we use JScript. There is no direct support but you can try the following. I should mention that those 2 CGI programs are quite antiquated and I know that IOS has created some ‘actions’ that they would prefer we use: ADDATTACHMENT CHANGEATTACHMENT DELETEATTACHMENT LISTATTACHMENTS READATTACHMENT Here’s an example of building a LISTATTACHMENTS API (in C#): // build the ListAttachments base API StringBuilder listApi = new StringBuilder(); listApi.AppendFormat("{0}{1}", S3Constants.ActionFrameworkPath, S3Constants.ListAttachments); listApi.AppendFormat("?dataArea={0}", form.Productline); listApi.AppendFormat("&fileName={0}", tableName); listApi.AppendFormat("&indexName={0}", indexName); listApi.Append("&outType=XML"); baseApi = listApi.ToString(); Then you have to append a key string. Here’s an example of a fully constructed API: /lawson-ios/action/ListAttachments?dataArea=PATCH901&fileName=PURCHORDER&indexName=PCRSET7&outType=XML&K1=3535&K2=20100507&K3=333&K4=&K5=0
Regards Karin http://smartofficeblog.com
sVaye
Basic Member Send Private Message
Posts: 10
Basic Member
Thanks for the help. I was able get started with the StringBuilder, but am having trouble using the S3Constants.ActionFrameworkPath and S3Constants.ListAttachments. Can you tell me what library they're in?
Karin
Veteran Member Send Private Message
Posts: 57
Veteran Member
In 9.1.3 the S3Constants are in Lawson.Shared.S3 I think the dll is LawsonShared.dll. The two constants corresponds to ActionFrameworkPath = "/lawson-ios/action/" and ListAttachments = "ListAttachments" so just using those strings will do the trick or using the S3Constant that would be more robust for future change ... even though I don't see why they would change. Regards
Regards Karin http://smartofficeblog.com