Skip to content

JS Hook accessing record properties is undefined. #4912

Answered by ganigeorgiev
jcmiron asked this question in Q&A
Discussion options

You must be logged in to vote

The Record model is a translated version of the Go models.Record struct, aka. it is not a POJO and to access the schema fields you need to use the designated getter/setters - https://pocketbase.io/docs/js-records/#getset-record-fields:

record.get("ClassName")

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jcmiron
Comment options

Answer selected by jcmiron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants