error in the javascript method to remove an Object

4
Hi everyone, In Mendix 3, I have a function to delete an object like : mx.processor.remove({ guid : args.guid, callback : args.callback, error : args.error }); where args.guid is a string. Now, I move to Mendix 4, and I get an error when executing that function: "mendix.sys.Data.remove: parameter guid set but not of type Number " So, I change the function to: mx.data.remove({//Mx 4 guid : Number(args.guid), callback : args.callback, error : args.error }); Now, I get another error: "Failed to load resource: the server responded with a status of 560 (560) " and I check the server and see:" org.json.JSONException: JSONArray[0] not a string. at org.json.JSONArray.getString(JSONArray.java:308) at iW.b(SourceFile:386) at iW.a(SourceFile:352) at iW.a(SourceFile:295) ... and java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String at gl$a.a(SourceFile:19) at gl$a.apply(SourceFile:19) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233) I am not sure if that's a Mendix bug? Regards, I find a workaround: mx.data.remove({//Mx 4 guids : [args.guid], callback : args.callback, error : args.error });
asked
1 answers
3

This is a bug in the client API; I sent in a ticket for it. Thanks!

answered