Table of Content
HAL Forum
function integer CheckUsers (
string Users,string CCUsers,var string NewUserList,boolean CheckCustomer)
Description:
Checks if the user codes in the list have been registered in company Persons register and returns error code when a problem occurs (0=no error).
Parameters:
Users List of persons (eg. "USER1,USER2,USER3,USER4")
CCUsers Exteded list of persons to check. (eg. "USER32,USER33,USER34")
NewUserList A string that will be filled by the function and will contain all the person codes that were not errondeous.
CheckCustomer Determines if a check is executed if a customer with the person code exists.
// NOTE: As of 20/03/2011, this function does not verify global users. 
external function Integer CheckUsers(string,string,var string,boolean);

global
updating function LongInt ActVcRecordCheck(var record ActVc Actr,record ActVc Act2r,LongInt stat,LongInt long4)
begin
  LongInt res;
  record ActVc oldActr;
  record ActTypeVc ActTyper;
  record ActTypeGrVc ATGrr;
  record INVc INr;
  record PRVc PRr;
  record EGVc EGr;
  row EGVc EGrw;
  record UserVc EMr;
  Boolean acttypgrf;
  Integer j,jrwcnt;
  Boolean transf,gentrans,smalldevicesf;
  Integer errstr;
  string 255 tstr;
  Integer wherecoursor,NoActwithSameTime;
  record CUVc CUr;
  record CRMBlock CRMb;
  record ProdVc Prodr;
  record ProdOperationVc ProdOpr;
  record ActSeqVc ActSeqr;
  record PRAccBlock PRAb;
  record TRVc gTRp;
  val Qty;
  Integer ProgramType;
  LongInt oldnr;
  
  // -- //

  if (smalldevicesf==false) then begin
    errstr = CheckUsers(Actr.MainPersons,Actr.CCPersons,tstr,true);  
    if (errstr!=0) then begin
      RecordCheckError(errstr,tstr,-1,"MainPersons");      
      res = -1;
      goto LActVcRecordCheck;
    end;
  end;

  // -- //

  return;
end;
Related topics:
««