PdcOnline.ClockIn: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == ClockIn(PersonnelNo, BadgeNo, TooLateReason as String) as Boolean == Description == Returns true or false whether the Employee succesfully clocked in == N..."
 
No edit summary
Line 12: Line 12:


<source lang="vb">
<source lang="vb">
dim objProj
  dim objOnline
dim strRelNr
dim strCPID


   set objProj= pdc.Projects.New
   set objOnline = PDC.ProductRegistration.Online
   strRelNr = pdc.ChooseRecord(0,"", "")
   if IsValid(objOnline) then
  strCPID = pdc.ChooseRecord(8,"", "CP_DEBNR = '" & strRelNr & "'")
    if objOnline.ClockIn("1074", "", "") then
  objProj.SetCustomerID(strRelNr)
      msgbox "Clocked In"
  objProj.SetContactID(strCPID)
    else
  objProj.Save
      msgbox PDC.LastError
   objProj.Show
    end if
   end if
</source>
</source>


== Availability ==
== Availability ==
Available since 2014 (From version 4.3 onwards).
Available since 2014 (From version 4.3 onwards).

Revision as of 08:29, 10 December 2014

Declaration

ClockIn(PersonnelNo, BadgeNo, TooLateReason as String) as Boolean

Description

Returns true or false whether the Employee succesfully clocked in

Notes

This method executes the clockin command in the Shop floor registration

Code example

This code example connects to the Onlie object and clocks the selected employee in.

  dim objOnline

  set objOnline = PDC.ProductRegistration.Online
  if IsValid(objOnline) then
    if objOnline.ClockIn("1074", "", "") then
      msgbox "Clocked In"
    else
      msgbox PDC.LastError
    end if
  end if

Availability

Available since 2014 (From version 4.3 onwards).