How to add address book record through AIS API

jnginma

Member
Hi,
I've been an E1 developer for about 2 years now and have learned lots of good tips from the forum here.

I'm trying to familiarize myself with the AIS interface of EnterpriseOne.
I've been able to do several types of requests successfully including retrieving token, logout, return data from a form, and adding grid records through a form.

Now I wanted to add a new employee record into the address book app (P01012), but I can't get it to work. The JSON response from the server is not showing any errors but the record is not being added.
I can create the record using the same values manually through P01012, but not through AIS API.

Would greatly appreciate it if anyone had any insight. Thanks.

Here is the JSON request (I wasn't sure if formServiceAction is needed, so I tested leaving it out, and set to C, U, same result):
{
"token": "044znmWtUM87vuN/pwCbnAThCs7fSW+q5dT88elUCaTIZg=MDE5MDEwLTU0NTc1OTIyMTUwMjA1NzE2NUFJUyBDbGllbnQxNTE1NTA2NDM2Njg3",
"formServiceAction": "C”,
"formActions": [
{
"command": "SetControlValue",
"value": "400002",
"controlID": "12"
},
{
"command": "SetControlValue",
"value": "User 400002",
"controlID": "28"
},
{
"command": "SetControlValue",
"value": "400002",
"controlID": "32"
},
{
"command": "SetControlValue",
"value": "E",
"controlID": "36"
},
{
"command": "SetCheckboxValue",
"value": "off",
"controlID": "67"
},
{
"command": "SetCheckboxValue",
"value": "on",
"controlID": "129"
},
{
"command": "DoAction",
"controlID": "11"
}
],
"deviceName": "AIS Client",
"formName": "P01012_W01012A",
"version": "ZJDE0001"
}

The JSON response did not report an error but I've attached it in a text file since it's too long to paste here.
 

Attachments

  • AIS_P01012_JSON_RESP.txt
    50.2 KB · Views: 40
Yes, after further testing I found out I had to use the appstack endpoint.
I was originally trying to use formservice to directly access P01012|W01012A.

In case anyone is interested I had to make about 4 requests:
- Open P01012 | W01012B
- Press the "+" button to get to P01012|W01012A
- Fill in fields then press the ok button
- Close P01012

Thanks
 
The first two requests are not needed. You can open P01012|W01012A form directly, enter the fields and press ok button.
 
Back
Top