An integration receives “cannot be set directly” in payroll
Symptom
An integration cannot write a payroll value, and the message says it “cannot be set directly”.
You will not see it on screen: the payslip's state, totals, Personal Income Tax (IRS) and Social Security are locked on the form. It comes from an external program connected to fiscaldoo.
Message
In an integration with the Payroll Administrator profile, when trying to change the state of a payslip already paid:
Pending validation on screen: this message was obtained through an integration call, because the screen does not offer the field.“State cannot be set directly. What happened: the record is closed (or the field is derived from another record) and what was registered, paid or approved is never rewritten; no field can be changed. How to fix it: use the actions of the document (a validated payslip is corrected with a corrective payslip, holidays are cancelled and registered again). The attempt was registered in the audit trail.”
Verified causes
- These values are the result of a step. The state of a payslip or a batch changes with the buttons, which check the rules and leave a trail. The totals, IRS and Social Security come out of the calculation.
- The record is closed. On a validated or paid payslip, nothing is rewritten.
- The import screen does not open this door. In Payslips and in Process the month, Actions › Import does not recognise columns such as the state or the IRS withheld: the column stays at “To import, select a field...” and is not imported.
What to check
- Who wrote the value: an integration, a file, an automation or a person on screen.
- Which field it is. The message starts with its name (for example, State).
- The state of the record: a draft is still recalculated; a validated or paid record no longer changes.
How to fix it
Use the right step, instead of writing the value:
| You want to change | Do this |
|---|---|
| The state of a payslip or a batch | Use the batch buttons, in Payroll › Process › Process the month (Process the month) |
| Totals, IRS or Social Security of a draft | Correct the source data (contract, absence, pay item) and click Calculate |
| A value on a closed payslip | Create a corrective payslip (The payslip is already validated and cannot be changed) |
For an integration, ask whoever maintains it to remove that field from what it sends and to use the document's actions.
Expected result
- The value changes through the step's button, and the document's history shows who did it.
- The integration stops receiving the message once it stops sending the field.
When to contact support
- The message appears when clicking a normal payroll run button (Calculate, Validate, Mark as paid).
- The message appears when writing in a field the form lets you edit, on a record in Draft.
- The integration does not state which fields it is sending and the message does not say enough to find them.
Information to send
- The full text of the message.
- What you were doing: the menu and the button, or the integration's name and what it sends.
- The document (employee and month, or batch) and its state.
- The profile or user the action was done with.