SBX - Search With Button

SBX - Forum Post Title

How to insert data in AuditBase table

Microsoft Dynamics CRM Forum

Prasanth M asked a question on 23 May 2019 10:17 AM

Question Status

Suggested Answer

I am having requirement to update null value to Contact entity form field, But it should show in audit log. How can i achieve this, if i update null in database means the audit history in that record also updated to null, any possibility to do this?

Reply

Could you clarify the following please? You would like to update a field on contact entity with null value but don't want this change to be shown in the Audit History?

Reply
Charles Abi Khirs responded on 23 May 2019 10:45 AM
My Badges
Suggested Answer

Hello,

You have to enable auditing in order to see those changes.

1. Enable global audit on the organization level (Settings > Audit)

2. Enable the audit on the entity level (contact in your case)

3. Enable the audit on the field level

Once all is done and the desired field where you enabled the audit is changed in the form, you can see the audit logs in the related relations of the record even for the null values

Reply
Prasanth M responded on 24 May 2019 1:42 AM

Hi Kokulan , exactly i have one option set in contact entity when ever this field change to Clear option in that option set my plugin will trigger and update the database to null for that field. But i don't want it to reflect on Audit History, if i update that field value to null means audit history also showing as null. How to keep this update only in entity level.

Reply
Dynamics365 Rocker responded on 24 May 2019 5:01 AM
My Badges
Suggested Answer

Updating CRM database is highly unsupported.

Enable Auditing on Contact entity and that particular field, Then it will appear in Audit history.

Below post will show you that how to enable Auditing:

crmbook.powerobjects.com/.../auditing-in-microsoft-dynamics-crm

Reply
Prasanth M responded on 24 May 2019 8:50 AM

i am using On premises version so update to database data is supported, its unsupported only for online version.

Reply
Dynamics365 Rocker responded on 24 May 2019 10:14 AM
My Badges
Suggested Answer

You can not update Database of Online as you don't know where it is stored.

In on premise, you have database on your server and you are not suppose to update database of CRM on premise. It is UNSUPPORTED.

Reply
Charles Abi Khirs responded on 23 May 2019 10:45 AM
My Badges
Suggested Answer

Hello,

You have to enable auditing in order to see those changes.

1. Enable global audit on the organization level (Settings > Audit)

2. Enable the audit on the entity level (contact in your case)

3. Enable the audit on the field level

Once all is done and the desired field where you enabled the audit is changed in the form, you can see the audit logs in the related relations of the record even for the null values

Reply
Dynamics365 Rocker responded on 24 May 2019 5:01 AM
My Badges
Suggested Answer

Updating CRM database is highly unsupported.

Enable Auditing on Contact entity and that particular field, Then it will appear in Audit history.

Below post will show you that how to enable Auditing:

crmbook.powerobjects.com/.../auditing-in-microsoft-dynamics-crm

Reply
Dynamics365 Rocker responded on 24 May 2019 10:14 AM
My Badges
Suggested Answer

You can not update Database of Online as you don't know where it is stored.

In on premise, you have database on your server and you are not suppose to update database of CRM on premise. It is UNSUPPORTED.

Reply

SBX - Two Col Forum

SBX - Migrated JS