Frage

Hi does anybody know if its possible to truncate a staging table via a web service in AX 2012? There is the delete method, however this is a bit slow for a large number of records.

War es hilfreich?

Lösung

For anyone who is struggling with this. I created a new method (class and operation) in my web service and exposed this, to delete all records from a table. The following code was used:

[SysEntryPointAttribute(true)]
public void truncateTable()
{
    TableNameHere tableNameHere;
    ;
    ttsBegin;
    delete_from tableNameHere;
    ttsCommit;
}

Andere Tipps

As I don't have any details about your web service (is that customization of some standard service or you've created custom service?), I'd like to suggest following: create Custom web service with one method which will delete required records.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top