Application Studio. Rest Kinetic. PartSvc GetById. Response parameters?

Hello EpiUsers!

I am currently trying to perform a GetByID Rest call. I would like to pull the Part Description using the PartNum.

I would like to add the PartNum and PartDescription fields to the actionResult data view.

My Rest call is “successful” but I cannot bind any data to the actionResult dataview.

Below is my setup.

Event

Click a button to trigger a REST Kinetic call. Display an alert indicating Success/Error/Empty

This event is displaying the success alert.

Rest-erp > Rest Services

This should be correct.

Rest-erp > Rest Services > Method Parameters

This should be correct.

rest-erp > Rest Services > Kinetic Rest Arguments

The Process REST response is checked by default. Otherwise, I did nothing.

Rest-erp > Rest Services > Kinetic Rest Arguments > Request Parameters

I did nothing here. Based on pervious EpiUsers posts I think this is supposed to be blank. Which makes sense because the parameter PartNum has already been set.

Rest-erp > Rest Services > Kinetic Rest Arguments > Response Parameters

This is where I am getting tripped up. What is supposed to go here?

I would like to populate actionResult dataview with PartNum and PartDescription.

What is supposed to go in (6), (7), (8), (9), and (10)?

I am fairly confident that (8) is supposed to be actionResult.

Postman Request Output

Below is the structure of the response JSON. returnObj is the root. Part is the table I want.

Application Studio Event Test

Upon triggering the event with the button click, the rest call goes down the Rest success path.

Developer Options Debug

I observer that the rest method is POST. However, the Rest call is still successful.

However, when I check the actionResult data view, it shows as empty.

I strongly suspect my Response parameters are incorrect. Could anyone shed light on this? Your help is much appreciated. Sorry for the long post. =’)

I do not recommend using actionResult as that is the default output from running a kinetic-function, so it may get overwritten. instead, i recommend creating a new dataview “mypart” with no set up other than the name.

then, for your “Response Parameters” screenshot, 8 should be “mypart”

7 should be “Part” - which is the DataTable inside of the DataSet (returnObj is the DataSet)

6 leave blank. If it is a nested parameter you would need that.

10 = replace.

3 Likes

Hi Gabe- Thank you for your reply. When you say DataView with no setup, so you mean this?

Or should I create a DataView from the BO.PartSvc with all the fields listed out but no data initialized?

(I super appreciate your help!)

I followed this article here.

Update Data with Rest API in Application Studio - Kinetic ERP - Epicor User Help Forum

The empty DataView has to have the same fields/data types/structure as the rest call response.

I created an Empty Data View using Part BO service, then did not initialize with any data. The REST call populated the empty DataView with my desired part.

Thank you!

1 Like

To answer this question (even though the issue is already resolved) - the dataview used in this case does not need any setup, no columns defined, dirty view can be unchecked, ERP is ok on schema and it only needs to have a name. The columns in the dataview will blink into existence when the kinetic-rest widget pulls the data in :slight_smile:

1 Like

GASP I will try this later. I did not know that. Thank you for all your help. :innocent:

1 Like

Hi,
I was trying to update from rest-kinetic -DynamicQuery. Am getting the required out put for query result but row update from the response is not working. Below is my response


I have created a dataset as mentioned above (SS below)

In rest response i passed the as below,

In Row update i passed as below.

Still is not working, What might be the reason?

Looks like you’re missing a single quote at the end of your JSON expression (before the double quote).

Tried, No luck. Not working.

Try getting rid of the single quotes and the question mark. You should really only need the “{dataview.column}” reference.

Still same, But error message change to undefined.


Below is my dataview name where i passed in response parameter