I was going to reply to the post Passing a View to a Function by @hmwillett but the bot accused me of “Necroposting”. I am able to pass the data but it seems like a hack and I would like to be able to access the Dataview data properly. Currently I am able to pass the data view by using this #_JSON.stringify({Table1:trans.dataView('SpecialItemsView').viewData})_#. I am mauaully adding the “Table1:” before the trans.dataView… because c# uses the table name. I got the idea for the #_ ..._# syntax from this post. It works but doesn’t seem like it is the proper way to access data from the view. Does anyone have experience with this?
Gotcha. Thanks for the response. Do you know if there is a better way to access the data from the view other than this #_JSON.stringify(trans.dataView('SpecialItemsView').viewData)_# ? I am using this in other places. For instance I am assigning the data in the SpecialItemsView to the text box “Result”. I am also putting this in the erp-function->Method Parameters->Field Value to be passed to the function as a parameter type “String”. If I CTRL+ALT+V ,in dev tools, and expand my SpecialItemsView I see the column “Name” and the rows.
I think that would give me the individual value per row. I am needing a list/array of the contents of the grid. Ex. [{Name:"one"},{Name:"two"},{Name:"three"},{Name:"four"}]. I can then shape it, if needed, to something like one~two~three~four or whatever. Can I bind to the viewData not just one column?
Not really.
If you’re looking for aggregate data like that, I would build the string in your function and return that aggregate string instead of a dataset.
What exactly is it you’re trying to accomplish in the end?
I am working on a product configurator we are starting to build. We are storing “non-standard” items( items not in a predefined list or combo box) in a grid view that we can use when building our “bill of materials”. I am going to set the value of a text box to be a list of “Special Items” that we may or may not need to order. I like your idea of returning a string from my function for the text box. I could actually return both in 2 separate response parameters. One dataset to populate the grid the other formatted for a string like this one~two~three~four. I suppose I need to continue to use #_JSON.stringify(trans.dataView('SpecialItemsView').viewData)_# to get the data from the view to pass as a parameter to the function?
Thanks for taking time to help. I am about to leave work so I will try this on Monday. By the way is the difference between erp-function and rest-erp the payload you send from the client?
The difference is the function widget can only do functions.
The rest widget can make any BO call.
I’m pretty certain the function widget is just a dumbed down version of the rest one.
I would try using the row-copy widget and copy the current row to a new dataset and send that whole dataset containing the single row to your function.
Hello Hannah,
I think it working as expected what I find the problem is using BO delete method to delete the list of pricelists per supplier.
I tried using BPM and use VendPart BO and the method DeleteByID but that too didn’t work. Not sure whether there is a bug or something.
This is the error I am getting everywhere: Kinetic Debugging, Rest help as well as BPM. Have you gone through this before? If yes, can you guide what else can I try to do?