Question Status

Unanswered
Wayne Findley asked a question on 18 Feb 2015 5:19 PM

Customer has enabled Auditing on relevant org/ent/attributes.  Works fine for usual browser-based changes.  Audit does not fire for webservice-initiated changes.  Standard SDK used for changes feed to webservice.   Thoughts?

Reply
Mithilesh Kumar responded on 18 Feb 2015 8:44 PM

Hi Wayne,

How are you updating the Fields, using IOrganizationService.Update message?

If yes, then the system should capture the changes as an Audit.

Actually this is other way round. The system will audit all attribute which are submitted as part of an Update message whether they are changed or not.

For eg:

If you have changed your first name and not the last name in contact and then you update your record by submitting first name and last name, the system will record the audit for the last name as well

// change just the first name and submit unchanged last name as well
e = new Entity("contact");
e["contactid"] = id;
e["firstname"] = "Firstnamechanged";
e["lastname"] = "Mithilesh"; // Last name not changed
service.Update(e);

Note: This will audit your first name and last name in the Audit history


Hope that helps

Thanks

Reply
Wayne Findley responded on 24 Feb 2015 9:26 PM

Checked calling code - is using a (proxied) IOrganizationService.update method as expected.  However, as we pass an entire (whether changed or not) recordset across each time (daily), perhaps it's just as well auditing is not occurring.  Client has recognised this and has requested a delta-only update, which we will accommodate by some SQL at the recordset-generation end, some xml transforms to weed out unchanged elements, and a hard look at the exact form of calls thus made.  

In summary, still no further understanding as to why auditing should not currently be occurring.....

Reply