How to update an object using the Client API

0
I'm really new to Pluggable Widgets and it feels like I have a really basic question, but somehow I can't get any further using the available documentation or the forum.   Using react, we've created an interface with different slots on which you can click. If you click (or drag) in those slots, you get a popup where you can edit a few things. How can we set parameters for this object using the Client API? So far we've managed to only set one parameter, but we want to set multiple.   This shouldn't be so hard, right? Just editing a few attributes on an object?   *edit: we have thought of  two possible scenario's: either change the object, or give multiple parameters to a microflow and handle everything in the microflow
asked
2 answers
1

Did you check out the Client API? I have done this many times, the trick is to load the client api with NPM into your react widget. If that succeeds you can use all functions exposed by the client API.  You will need the MxObject.set() function

answered
1

Hey Jeroen,

Since I'm also not an expert building custom widget, but i build some of them just for fun, what I found very useful is download some complex widget from marketplace and look there code just to get better overview and understanding how expert is building them and reuse code what will be useful for me. My suggestion is to forward object to microflow then change attributes it's will be easier for maintain (e.g. maybe in future you will add more then just few attribute or associations, calculaction...) and you can debug it easy inside of modeler.

Best regards, Slavko

answered