With this function files attached to an instance can be deleted.
Parameter |
Key |
Description |
|---|---|---|
$fieldname |
string |
Name of the process table or subtable column |
$row |
int |
ID of the row in a subtable (optional) |
$subtable |
string |
Name of the subtable (optional) |
The function does not provide any feedback. In case of an error a JobRouterException is displayed.
Example:
…
// Delete in process table
$this->deleteFile('ATTACHMENT');
// Delete in subtable
$this->deleteFile('ATTACHMENT', 1, 'POSITIONS');
…
Please note: Within step initialization and dialog functions files are only removed from the instance correctly, if subsequently the function save() is used to save the step.
Example:
…
$this->deleteFile('ATTACHMENT');
$this->deleteFile('ATTACHMENT', 1, 'POSITIONS');
…
// Save the step
$this->save();
…