New Official Sample - NoOffice CRM - Mass Mailing/MailMerge/Labels/Phoning/Addressbook (Ver. 8.0.0.1349)
This is the first of the official Samples that will be shipped with DE8 Classic. The fun thing with our new samples, is that we will keep updating the samples as well as the product. This sample will be further enhanced as we progress, but it should be more than enough to catch up with already.
Traditionally the samples has been rather poor, but this too have changed. We want our samples to be useful and inspire. The old "main" sample Club ParaDEASE is well over 20 years old so we thought it was high time to retire it and we promise that you will never see it again!
In this NoOffice CRM sample we showcase almost all the new functionality like ExecDQL(), the entire MemoClass, FileClass, SetClass etc.
We do a lot of "magic" that DataEase have never been able to do before, but don't worry it is not as hard as it looks. The DQL that send the group emails only look like this:
define "retval" text .And a lot of it is just to give feedback to the form so you see the progress etc.
define "varEmail" text .
define "msgstatus" text .
retval:= SetState("ResponseBox",1)+SetState("ResponseMessage",1) + SetLabelText("ResponseMessage","Sending emails.....") .
retval:= Wait(0.1) .
for Documents with DocumentGroupID = data-entry field1 ;
varEmail := any Customers named "CusRel" with CustomerNr = Documents CustomerNr Email .
if varEmail not=blank then
retval := send(concat("blat -to ",varEmail ," -html -subject ", chr(34) ,heading,chr(34) ," -bodyf ",chr(34),concat(getcurrent("AppPath"),"\mail\", customerNr ,".html"),chr(34) )) .
msgStatus := concat("Sent: ", current date, " - ", current time) .
else
msgStatus := "No email address on recipient! Message not sent!" .
end
modify records
status := msgStatus .
retval := wait(0.1) .
retval := SetLabelText("ResponseMessage",concat("Message sent to: ", any CusRel CustomerName)) .
end
retval := SetLabelText("ResponseMessage","All emails sent!") .
retval := wait(3) .
retval:= SetState("ResponseBox",0)+SetState("ResponseMessage",0) .