I can't find information about DataParameterArray in Data Abstract for javascript

Hi
I’m trying to call a function of a customServer but I’m having problems with one of the parameters that is defined as DataParameterArray.
Simple arrays are not recognized by the server.

Could you elaborate please what exactly you are trying to do and which exactly error do you get?

Thanks in advance

I have this function:
__namespace.GRSCServ.prototype.CodigoActivacion = function(
aSistema,
aVersion,
aCodigoRegistro,
aOpciones,
aOpcionesBits,
aFechaExpiracion,
__success, __error) {
try {
var msg = this.fMessage.clone();
msg.initialize(this.fServiceName, “CodigoActivacion”);
msg.write(“aSistema”, “AnsiString”, aSistema);
msg.write(“aVersion”, “AnsiString”, aVersion);
msg.write(“aCodigoRegistro”, “AnsiString”, aCodigoRegistro);
msg.write(“aOpciones”, “Integer”, aOpciones);
msg.write(“aOpcionesBits”, “DataParameterArray”, aOpcionesBits);
msg.write(“aFechaExpiracion”, “DateTime”, aFechaExpiracion);
msg.finalize();
this.fChannel.dispatch(msg, function (__message) {
var __result = __message.read(“Result”, “AnsiString”);
var __aOpciones = __message.read(“aOpciones”, “Integer”);
var __aOpcionesBits = __message.read(“aOpcionesBits”, “DataParameterArray”);
__success(
__result
,
__aOpciones,
__aOpcionesBits
);
}, __error);

    } catch (e) {
        __error(msg, e);
    };
};

And I am trying to call the function as follows:

let GRSC = new GRSCServ(regEstaciones.channel, regEstaciones.message, regEstaciones.serviceName),
arr = [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, true, false, false, true, false, false, false, true, false];

GRSC.CodigoActivacion($('#Sistema')[0].value, $('#Version')[0].value, $('#ClvRegistro')[0].value,  undefined, arr, new Date(), s => {
            
            callback(s, test);
            
}, RemObjects.UTIL.showError);

I don’t know exactly how I have to declare a DataParameterArray object.
Also try as follows:

let arr2 = new RemObjects.SDK.RTTI.DataParameterArray();
arr2.items = arr;

but I get the following error:
Screen Shot 2020-01-07 at 11.18.09 AM

Thanks for your help

Hello

This is how it is intended to be used:

Please create a simple testcase (server with a single method and a single html page with a single method call) where this issue can be reproduced.

1 Like