Jump to content

Client notes on services


SeanP

Recommended Posts

Sorry if this has already been posted.  I searched, but didn't find what I was looking for...

Does anyone have a module, or custom code, to allow clients to add/edit a note next to each service within their "My Services"?  We have some clients who lease several systems from us, and it would be helpful to them to be able to label the servers in order to reference  what they are used for.   For example, if one is an application server, one is a database server, and one is a web server, it would help if the client can have an editable note field on each one to specify which one provides which service.

Link to comment
Share on other sites

Looking around the marketplace, I did not find any that would allow editing of notes. 

This could be done with a couple different hooks, though an addon module would likely be better.  One hook to inject the notes field, one hook to watch for a POST of that notes field for saving.  Using the service's notes field would be the easiest option I think as otherwise you would need a custom field or database table for storing the notes.   A service custom field that can be updated by the client would be handy in this case for just a simple label. 

Are you using your own module or a third party?  If own, you could role that in to that module's clientarea function or using a custom action function to save the notes field. 

 

Link to comment
Share on other sites

Since your dealing with your own server module, that would be up to you on how that is done.  Many ways to do that from an ajax request with a field and a button to a custom function and client area custom button.   Doing the ajax request would likely be easiest to setup.

The notes field I am referring to is the notes textarea field under the service page .  It is below the username, server, domain, etc fields and just above the submit buttons when viewing a service within the admin. 

In terms of saving that field, it should be possible by getting the Service via the internal class, setting the notes field, and then saving the service.  Off the top of my head without testing, that should look like:

$Service = Service::find($ServiceID);
if ($Service)
{
   $Service->notes = $NewNotes;
   $Service->save();
}

How you actually get the $NewNotes is up to you.  😉   Similar setup can be done for custom fields.

Edited by steven99
chevrons help
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