Skip to content

How to add to field if id already exists #4855

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

You must be logged in to vote

On second read and based on your side-note, you want to check for stock_record/vstock_record based on the "product" field and not on the "id". In this case you can replace findRecordById in the above with findFirstRecordByData(yourCollecitonNameOrId, "product", item.product) (assuming that the product field is unique).

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@ganigeorgiev
Comment options

Answer selected by gaganbiswas
@gaganbiswas
Comment options

@gaganbiswas
Comment options

@gaganbiswas
Comment options

@ganigeorgiev
Comment options

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