[v70beta] RemoveSelectedData problem

Hi guys,

I have a strange issue here when I’m, calling removeSelectedData:

This is how I call it:

dbList.removeSelectedData(
                             function (response, data, request) {
                              if (response.status== -4) {
                                 var errors = response.errors,
                                 errorString = errors.errorMessage;
                                 isc.warn(errorString);
                                }
                             }
                           );

this is how I define my datasource:

isc.RestDataSource.create({
    ID:"dbDS",
    fields:[
{ name:"id", title:"ID#", showIf:"false", hidden:true, primaryKey:true, canEdit:false, width:50},
{ name:"firstname", title:"Vorname", width:"90", required:true},
{ name:"lastname", title:"Name", width:"120", required:true}
//etc
],
    showPrompt:false,
    dataURL:"include/data/dbsuppliers.php?menu=1&predefQ=0&nr_days=0"

});

Here is my ListGrid definition:

isc.ListGrid.create({
    ID: "dbList",
    width:"100%",
    height:"*",
    autoDraw:false,
    alternateRecordStyles:true,
    showAllColumns:true,
    emptyCellValue: "",
    dataSource: dbDS,
    dataProperties: { useClientFiltering:false},
    selectionType:"multiple",
    dataPageSize: 50,
  canEdit:true,
  editEvent: "doubleClick",
  modalEditing:true,
  showFilterEditor: true,

  fields:[
{ name:"id", title:"ID#", showIf:"false", hidden:true, primaryKey:true, canEdit:false, width:50},
{ name:"firstname", title:"Vorname", width:"90", required:true},
{ name:"lastname", title:"Name", width:"120", required:true}
],

  contextMenu: itemListMenu,
  autoFetchData:true
});

Here is what I’m getting from RPC tab in Dev Console:
Decoded Request:

{
    actionURL:"include/data/dbsuppliers.php?menu=1&predefQ=0&nr_days=0",
    showPrompt:false,
    prompt:"Deleting record(s)...",
    transport:"xmlHttpRequest",
    useSimpleHttp:true,
    promptStyle:"dialog",
    params:{
        id:"266",
        firstname:"fgfd",
        lastname:"gdfg",
        zip:"",
        city:"",
        countries_id:"5",
        birthday:"",
        deathday:"",
        status_author:false,
        status_editor:false,
        status_translator:false,
        tax_exemption:false,
        tax_exemption_date:"",
        controll_procedure:false,
        gender_id:"1",
        salutation_id:"3",
        title:"",
        c_o:"",
        street:"",
        tel:"",
        fax:"",
        email:"",
        bank_account_owner:"",
        bank_name:"",
        bank_code:"",
        bank_account_nr:"",
        bank_swift:"",
        bank_iban:"",
        tax_percent:3,
        cas_percent:3,
        socialtax_payer:false,
        vat_payer:false,
        taxoffice_number:"",
        taxoffice:"",
        comments:"",
        vita:"",
        last_update:new Date(1232110644000),
        vita_file1:"",
        vita_file2:"",
        areas_id:"2",
        vita_canvas:"",
        areas_1:false,
        areas_2:true,
        areas_3:false,
        areas_4:false,
        _selection_114:true,
        _operationType:"remove",
        _dataSource:"dbDS"
    },
    httpMethod:"POST",
    sendNoQueue:true,
    callback:{
        target:null,
        methodName:"$37c"
    },
    serverOutputAsString:true,
    data:null
}

Response Raw:

<response>
<data>
<status>0</status>
<record>
    <id>266</id>
</record>
</data>
</response>

Here is what I’m getting from Result Tab:

13:19:19.828:MUP4:WARN:RPCManager:sendQueue called with no current queue, ignoring
13:19:19.906:XRP0:DEBUG:ResultSet:isc_ResultSet_1631:dataSource data changed firing
13:19:19.906:XRP0:INFO:ResultSet:isc_ResultSet_1631:updating cache in place after operationType: remove, cached rows: 136, total rows: 249
13:19:19.906:XRP0:INFO:ResultSet:isc_ResultSet_1631:Updating cache: operationType 'remove', 2 rows update data:
[
"0",
{id: "266"}
]
13:19:19.906:XRP0:WARN:Log:findByKeys: passed record does not have a value for key field 'id'
13:19:19.906:XRP0:DEBUG:ResultSet:isc_ResultSet_1631:removed record matches filter criteria: "0"
13:19:19.921:XRP0:DEBUG:ResultSet:isc_ResultSet_1631:full length set to: 247
13:19:19.937:RDQ6:DEBUG:ResultSet:isc_ResultSet_1631:getRange(214, 246) satisfied from cache

So from where did “0” came up?

The <status> element should not be inside the <data> element, it should be directly inside <response> instead.

lol, this time I was a moron. Couldn’t copy-paste from the docs. :))

Thanks a lot Isomorphic for prompt response.