Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Page Properties

Description

New Joiner

Summary

Notification mail sent to specific email addresses when a new crew profile is created in Adonis. The select statement checks all the crew profiles created in the last 24 hours. The mail is not sent if Employment start Date or Rank is empty.

Keywords

New Employee

File / Script Link

Compatibility APM Version

N/A

Compatibility SQL Version

N/A

...

select
distinct
p01.pin #pin,
FORMAT (p01.EMPLOYMENTSTARTDATE, 'dd/MM/yyyy') #Employmentstartdate,
p01.firstname #Firstname,
p01.lastname #Surname,
org.name #Organization,
c02.name #Rank,
'itsupport@pxgeo.com, hr@pxgeo.com, ehsq.support@pxgeo.com,payroll@pxgeo.com' #email,
'helen.ustych@adonishr.com' as #TestEmail
from
pw001p01 p01
join pworg org on org.numorgid=p01.client
left join pw001c02 c02 on c02.code=p01.RANK
where (select (CREATETIME) from PW001P01 where PIN = p01.PIN)>dateadd(HOUR,-24,GETUTCDATE())

and EMPLOYMENTSTARTDATE is not null