layerId property

int get layerId

The layer or table Id.

If there's an error the return value is -1.