We have a custom module called “punches users” and another (related) custom modules called “punches”
We are inserting data into the “punches” module, one of the field we insert is “user_code”, we have the same field “user_code” in “punches users” module.
We would like to relate the “punches” record to the “punches users” by the “user_code”.
So basically we need a workflow that will search for the user_code in the “punches users” table and get the name of the record and insert it to the “punches” table.
Dear PGR, it is still not working for me, let me tell you what I did.
we changed the names of all users punches to the actual user_code (number)
When we add user punches from the CRM it works fine,
However, we are using an online form to submit the punches, so we are now sending the user_code as the relate_c, field, but it does not relate the punches to the punches users. What do you think? Thanks again for all efforts and assistance.
i think that with a web form it’s a bit more complicated, but you should still use the correct database structure.
When you use the relate field, the CRM handles the connection between the two tables for you. It essentially stores an id in a relationship table, and then has code to handle that elegantly on screens, allowing to select related records, show related fields etc.
In order to manipulate this directly you need to understand the internal workings of it…