Jump to content

provisioning module field change admin area


el_makong

Recommended Posts

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

Link to comment
Share on other sites

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 attachmentScreenshot_9.jpg

how do i get that value?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated