Notes table, user_id stored in session

Notes table, user_id stored in session

randy.johnsonrandy.johnson Posts: 18Questions: 8Answers: 0

Hello,

I don't have a code sample for this yet, just looking for a spot in the docs to explain or advice.

I have a notes table. with an intUserId column and an strNote column

The intUserId is stored in a session

When doing an action = create and the strNote gets passed into the php library,

action:create
data[0][vendor_notes][strNote]:test

how do I inject the intUserId so it gets inserted into the database?

Thank You,

Randy

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited November 2015 Answer ✓

    HI Randy,

    The best way, if you have this in session information, is going to be to use a server-side events - specifically preCreate.

    There is also a detailed blog post about server-side events that you might find useful.

    Allan

  • randy.johnsonrandy.johnson Posts: 18Questions: 8Answers: 0

    Allan,

    That is exactly what I needed. Thank You.

    -Randy

This discussion has been closed.