el_makong Posted November 29, 2015 Share Posted November 29, 2015 Hi, how do i catch the changes if the admin user is changing client's service fields? for example, i want to change the client's service server from ServerA to ServerB, terminate client from ServerA and create on ServerB if i call logModuleCall('mymodule', __FUNCTION__, $params, $_REQUEST, 'called'); inside function mymodule_AdminServicesTabFieldsSave(array $params) {} it didnt display any values from $_REQUEST what i need to catch is old serverid and new serverid 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted November 29, 2015 Share Posted November 29, 2015 you need to change it from inside the provisioning module it self, if no/or you don't have access to the source code, use this ActionHook http://docs.whmcs.com/Hooks:AdminClientServicesTabFieldsSave 0 Quote Link to comment Share on other sites More sharing options...
el_makong Posted November 30, 2015 Author Share Posted November 30, 2015 you need to change it from inside the provisioning module it self, if no/or you don't have access to the source code, use this ActionHook http://docs.whmcs.com/Hooks:AdminClientServicesTabFieldsSave i create this module myself.i have the access to the source code. i have looked into your link. there is no mention of "mymodule_original_serveridvalue" there. i see that one from https://github.com/WHMCS/sample-provisioning-module/blob/master/modules/servers/provisioningmodule/provisioningmodule.php // Fetch form submission variables. $originalFieldValue = isset($_REQUEST['provisioningmodule_original_uniquefieldname']) ? $_REQUEST['provisioningmodule_original_uniquefieldname'] : ''; $newFieldValue = isset($_REQUEST['provisioningmodule_uniquefieldname']) ? $_REQUEST['provisioningmodule_uniquefieldname'] : ''; // Look for a change in value to avoid making unnecessary service calls. if ($originalFieldValue != $newFieldValue) { } but its not on custom field. but from the base field..see the attachment how do i get that value? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.