Jump to content
  • 0

Insert record if Field Change




I have a case : If field A on detail page Changed/Edited, I want to create trigger to insert record to other table. But if Field A NOT changed/edited, the trigger idle.

How can I know if the field A changed/edited ?


Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @IVAN88,

The general approach is to join the updated table and the #inserted table on a unique field. This is needed to identify the record that is updated. 

The next step is to compare the value that was in the field before the update and the new value.

For example, I want to track the changes in the 'Phone' field:



What data do you need to insert into the second table? Is it taken from the first table?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...