Hi All,
How to know if a field is audited in a module,in its logic hook
Regards
Sidhu
Hi All,
How to know if a field is audited in a module,in its logic hook
Regards
Sidhu
Hi Sidhu,
If it is just about checking if audit is enabled simply go to Admin > Studio > Fields and check for the audit checkbox:
Best,
Dennis
i am aware about this,but i want to know how can we loop through the fields in a logic hook and retreive the fields which have audit as checked
Regards
sidhu
i am aware about this,but i want to know how can we loop through the fields in a logic hook and retreive the fields which have audit as checked
Regards
sidhu
Ah ok now I see. Which version are your running?
In Sugar7 with Rest v10 you can use GET /metadata to receive all fields etc. In the following example I got the whole metadata for Accounts. In there you will find the fields and for each audited field you will see
[audited] => 1
$url = $base_url . "/oauth2/token";
$oauth2_token_arguments = array(
"grant_type" => "password",
//client id/secret you created in Admin > OAuth Keys
"client_id" => "test",
"client_secret" => "test",
"username" => $username,
"password" => $password,
"platform" => "base"
);
$oauth2_token_response = call($url, '', 'POST', $oauth2_token_arguments);
//Endpoint - GET /<metadata>/
$url = $base_url . "/metadata/";
$record_arguments = array(
"module_filter" => "Accounts",
);
$record_response = call($url, $oauth2_token_response->access_token, 'GET', $record_arguments);