Migrated from Redmine #85 | Author: Anonymous
Status: Closed | Priority: Normal | Created: 2018-01-04
When trying to access your API from the server it seems to connect but I get this error: JSONRpcClientException {
code: -32000,
message: ‘SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (em_cyno.sheduler_comment, CONSTRAINT sheduler_comment_ibfk_1 FOREIGN KEY (sheduler_id) REFERENCES sheduler (id))’ }
It looks like everything is connecting okay through JSONRpcClient but I’m trying to add a comment to an existing booking. Perhaps this is not allowed. I need a way to add information to the booking once the booking is made. That’s why I’m using a comment. I need to be able to add a link to the booking on the calendar that contains the booking code. I can’t do ti using additionalFields because I don’t have access to the booking code before calling the book() method. Once it is called I can’t seem to add anything to the booking using the response I get from the book() call response data. This is why I’m attempting to use a comment added to the booking from the server but it’s throwing an error.
Any ideas would be helpful, thanks!
This is the javascript code I’m using on the NodeJS server:
client.setBookingComment(event.data.val().code, ${event.data.val().code}: This is a test comment generated after booking automagically)