I'm making an API call from an external service to change a custom field in the Accounts module in Sugar 8.3. The difficult part is that, when the field is changed, I don't want the "date-modified" field to change. I think that one way to do this is to set up an API logic hook where something like this happens:
$Account = BeanFactory::getBean('Accounts', $Result['id']);
$Account->update_date_modified = false;
$Account->update_modified_by = false;
Here are my questions about this:
1) Does this approach make sense, or is these a better way to do this?
2) What type of an API hook should I use? Before_routing, after_routing, or before_filter?
3) The route used by the API call would look like this: <Sugar URL>/rest/v11/Accounts/<account id>. How can I get the account id parameter from the request inside the API hook?
Thank you for any help!