Rename an existing WEB support group.

 

Syntax

function mRenameWebSupportGroup(iID: integer; sNewName: string): integer;

 

Parameters and return values

Parameter

Type

Value

ilD

integer

numeric identifier of WEB support group;

sNewName

string

new name for a group

 

Function result

0

function executed successfully; group renamed;

-1

group name can't empty;

-2

you can't rename a group, such group name already exists in the database.

 

Example

const
  GROUP_NAME     = 'MyChat Web Support Group Test';
  GROUP_NEW_NAME = 'MyChat Web Support Group Test (renamed)';
var
  iID: integer;
  s: string;
begin
  iID := mCreateWebSupportGroup(GROUP_NAME);
  
    if iID > 0 then begin
      mLogScript('Group "' + GROUP_NAME + '" created, ID = ' + IntToStr(iID), '');
      
      mRenameWebSupportGroup(iID, GROUP_NEW_NAME);
      
      s := mGetWebSupportGroupNameByID(iID);
      mLogScript('New group name is "' + s + '"', '');
    end else mLogScript('Something went wrong :)', '');
end.


Script work result

[17:40:05] (Log "mRenameWebSupportGroup"): Group "MyChat Web Support Group Test" created, ID = 7

[17:40:05] (Log "mRenameWebSupportGroup"): New group name is "MyChat Web Support Group Test (renamed)"

[17:40:05] (Run "mRenameWebSupportGroup"): Script operation time: 6 ms

[17:40:05] (Run "mRenameWebSupportGroup"): Script done successfully.

 

See also

IntToStr

mGetWebSupportGroupNameByID

mCreateWebSupportGroup

mLogScript

Created with the Personal Edition of HelpNDoc: Easy to use tool to create HTML Help files and Help web sites