JSAPI setAssetStatus function


(Anthony) #1

I have some code that uses the setAssetStatus JSAPI call in standard mode. Stopped working after a recent upgrade from 4.16 to 5.1. After a little debugging I worked out that the parameter list for that function seems to have changed and there are now six params rather than 5. the callback remains the last parameter, with the new one (userlog) entered as the fifth. So invocation with only five parameters was failing as the callback function was being interpreted as a string.

 

Looking at the manual page I see that the enhanced mode description reflects all six parameters, but the standard mode example still shows only five. An update to this documentation would avoid confusion.

 

The function should probably also be highlighted in yellow as a change - not sure at what release it was amended?


(Bart Banda) #2

Standard mode of the JS API in 5.1 has been deprecated and is no longer worked on. I recommend you change to using enhanced mode as standard mode will eventually be dropped completely from Matrix in the future. We'll look at getting the manuals updated to.