Creating Records in Table

Hi,

Problem Statement:
We are unable to store application information to a table using trigger logic.

Detailed Information:
Trying to store user information to a table using the below trigger logic.

But for some reason the information is not getting created/stored to the table.

Am I missing something in the trigger logic?

Hi Manoj, does a record with an ID of “1” already exist in the table? The record IDs must be unique, so there can only be one record with an ID of “1”.

1 Like

Hi Kevin,

Thanks for your response.

No, the table does not have a record with an ID of ‘1’.

In fact, the table is empty and does not have any values, PFB.

Thanks!

Hi @ManojNagarajan18 -

I noticed in your table, “User information” is a column with the type of “text” but you are trying to store an integer in that column (the value “1”). That likely could be causing your issue here. If you change your trigger to store a static value of “User1” instead of just “1” does the trigger now work and save data to the table?

It is important to make sure the column / field type matches the type of data you will be saving into that field! An Overview of Tables

If this doesn’t work, as an additional troubleshooting step, if you remove the “If” condition, does the table populate then? I am wondering if that condition is not being met, which would result in the rest of the trigger not running and not creating a record.

Let me know if either of these suggestions help!