View Full Version: Populate Design Studio Form.

LawsonTalk > BCI, Processflow and Addins > Populate Design Studio Form.



Title: Populate Design Studio Form.


mmrobinette - January 9, 2008 08:43 PM (GMT)
Essentially we are running a processflow and we have a design studio setup to display ags down from the workunit. we decided to display a Form (AR20) and then customize a version of this to be used with this process so they could do a change on a date in AR20.

We have the form displaying however we can't populate with the company and batch number. Any advice? is this something done through javascript or something easier??

mthedford - January 17, 2008 09:22 PM (GMT)
We don't have AR, so I don't know what the form looks like, but it essentually sounds like other examples that Lawson has in the ProcessFlow & Design Studio documentation. You will need to create a custom AR20 and give the form at least Inquire and Change access, with Inquire as the default FC.

I haven't played with defining and delivering a custom form through the Folders Portal Inbasket link yet, so my approach is then to create a Portal Page with the custom AR20 as the formlet.

I display custom PA52's (Inquire only access with just the Selected Items 1,2,3 tabs available) in our Portal Inbaskets. The script below is what I use to populate the form fields from the WorkUnit in the Portal Page so that it can do the initial inquire for the user. You will also need to map your data elements required for the form.

function portalpage_OnInit()
{
var pStorage = new PortalStorage()
pStorage.addElement("PCT-COMPANY",page.parameters.COMPANY)
pStorage.addElement("PCT-EMPLOYEE",page.parameters.EMPLOYEE)
pStorage.addElement("PCT-ACTION-CODE",page.parameters.ACTION)
pStorage.addElement("PCT-EFFECT-DATE",FormatLawsonDateToStandard(page.parameters.EFFECT_DATE))
page.setObjectValues("PA52.1_PF_INQ",pStorage)

return true;
}

function FormatLawsonDateToStandard(sDate)
{
//Returns Lawson date (yyyymmdd) as Standard Date string (mm/dd/yyy)
var s = ""
if (sDate != "")
{s = sDate.slice(4,6) + "/" + sDate.slice(6,8) + "/" + sDate.slice(0,4)}
else
{s = ""}
return s
}




Hosted for free by InvisionFree