I tried to create a transaction via API and API2, it seems automatic reference is not working. The record is created, but the Reference Number is empty.
// Create a new array for JSON objects
$json = array(
"Date" => "2024-02-28",
"Reference" => null,
"AutomaticReference" => true,
......
)
I want an automatic reference number, what should I enter in the Reference Property? Iāve tried Null, Nothing, Empty string and Delete Reference Property Line also no luck.
Displaying Property without Value in Json gives us an error.
PHP Script runs normally, but the result is the same, I donāt get the Reference Number
I have tested this and you are right, the API doesnāt support auto references. I must have confused this with Batch Create which fully supports auto references.
I donāt know if thereās any technical reasons for this though so Iām going to keep this post open for @lubos to have the final say on this.
From the beginning of this topic I was trying to figure out why it would work and had hoped to see that somehow it could. My doubt was based on the fact that autoref needs a starting ref and continue with a +1 after that. This would require some query of the database to find the starting ref and then some logic to increment it and this would be āloopedā. For Manager app to do this is no problem but I would not know how to get the API doing it except if it does the query and increment by its own coding.