Birthday message

Heiko_DHeiko_D Member Posts: 11
Hello all,

i hop you could help me.

At first a beginner question: I want to insert a new text feld in the contact form. And the content of this new text box shold be insert into a new table.

1 So my question is, what i have to change at properties to bund this box to the new table? i hope this question isn't too silly.

2 secondly i want to be remembered if anybody has birthday.
2.1 perhaps an email? but how to code this?
2.2 or just a message. would it be possibel to do this with if datum today= datum birth then send email to ..... with topic xyz' ?

Thank you for reading.
Heiko
secon EDV-Consulting GmbH
Software | Schulung | IT-Beratung

Comments

  • garakgarak Member Posts: 3,263
    Hy Heiko

    1.) make a new field in table contact which has a relation to your new table.

    2.) yes this is possible. You must knwo, in which table you will store the day of birth (for example employee). Take a look at CU Mail. Here you can see how you can send mails with navision. But the mailmessage must be send autom. from navision, so you need a NAS or a Client who runs a job sheduler.

    To get automaticly a Info message when you are loged on, you must expand CU 1, for example in function LoginStart or CompanyOpen.
    If you don't want a message, you can also create a report to print out a list of all birth days.

    Regards
    Do you make it right, it works too!
  • SavatageSavatage Member Posts: 7,142
    edited 2008-05-20
    Never tried but you can take a look at this too...
    BirthdateMonitor for MBS-Navision
    http://www.mibuso.com/dlinfo.asp?FileID=517
    To know our clients birthdays is important and a short phone call or email to say "Happy Birthday!" is a part of a good customer relationship management (CRM).
  • Heiko_DHeiko_D Member Posts: 11
    Thank you. You helped me a lot.

    but now i have a new problem:

    in insert in the codeunit 1 under the trigger CompanyOpen()

    IF Birthday.Birthdate=TODAY THEN
    MESSAGE (Text001);

    Birthday is a Variable with Record to the "Contact" Table.
    Text001 would be a variable for the name of the person you has birthday.

    But nothing happend when i run the codeunit...

    Please help me.
    Heiko
    secon EDV-Consulting GmbH
    Software | Schulung | IT-Beratung
  • gopi_navisiongopi_navision Member Posts: 7
    Hi,

    1. Create one new Table add one fields called User and another field called birthday date. Link that table relation in USER NAVISION TABLE.

    2. Go to codeunit Company Open trigger write these code


    RecApproval.RESET;
    RecApproval.SETRANGE(RecApproval.USERID,USERID);
    IF RecApproval.FIND('-') THEN
    BEGIN
    d := RecApproval.Birthday;
    day := DATE2DMY(d,1);
    Month :=DATE2DMY(d,2);
    T := TODAY;
    TDay := DATE2DMY(T,1);
    TMonth := DATE2DMY(T,2);
    IF (day = TDay) AND (Month = TMonth) THEN
    MESSAGE('Happy Birthday TO YOU');
    END;
  • Heiko_DHeiko_D Member Posts: 11
    for dummies plz:

    what do you mean by "recApproval"

    do you mean the new table User&Birthday?

    And why said Navision, that d is an unknown Variable?
    you said that it is the Feld "Birthday" of the new Table...
    or have i to number all varable like d, day, Month, etc.
    under the globals?

    thank you in advance.
    Heiko
    secon EDV-Consulting GmbH
    Software | Schulung | IT-Beratung
  • AlkroAlkro Member Posts: 115
    Heiko_D wrote:
    what do you mean by "recApproval"
    Variable Record. Source --> New table


    1.- Create a Table (User Bithday) with 2 Fields, USER and BIRTHDAY. In propierties of USER (TableRelation propierty) you must enter in Table: "User" and Field: "User ID".

    2.- Edit Codeunit 1 "ApplicationManagement", at the end of LogInStart() function you must create local variables:

    Record called "RecApproval" and Subtype, name of new table.

    Then put the code:
    recApproval.RESET;
    recApproval.SETRANGE(recApproval.User,USERID);
    IF recApproval.FIND('-') THEN
    BEGIN
      IF (DATE2DMY(recApproval.Birthday,1) = DATE2DMY(TODAY,1)) AND (DATE2DMY(recApproval.Birthday,2) = DATE2DMY(TODAY,2)) THEN
         MESSAGE('Happy Birthday TO YOU');
    END;
    

    Remember complet the new table with Users ID and birthdate ;)

    Best Regards :roll:
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Why don't you just do this in Outlook? Yeah Navision is great, but you don't have to do EVERYTHING in Navision.
    David Singleton
  • Heiko_DHeiko_D Member Posts: 11
    thanks a lot :)

    whatever a customer want, a customer get.... :|
    secon EDV-Consulting GmbH
    Software | Schulung | IT-Beratung
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Heiko_D wrote:
    thanks a lot :)

    whatever a customer want, a customer get.... :|

    That is a VERY VERY bad attitude to have in the NAV world. What you customer will get is a VERY expensive system that does not work. :evil: :evil:
    David Singleton
  • garakgarak Member Posts: 3,263
    don't sell the customer all he want. Sometimes you must say: "Dear customer, your request bring a bad performance on the system. Our workaround is ....." ;-)

    Regards
    Do you make it right, it works too!
  • Heiko_DHeiko_D Member Posts: 11
    Many thanks for all your tips :)

    I will try to follow your suggestion :)
    secon EDV-Consulting GmbH
    Software | Schulung | IT-Beratung
  • Heiko_DHeiko_D Member Posts: 11
    The customer wants this feature...
    so i hope you can help me a third time :-k

    I searched a lot and have found the Dialoge.CONFIRM function
    If I understand it right, i have with this function the possibility
    to choose yes and no.

    Yes would be to change to the contact card of the contact which has birthday.

    So i want to show a message like "Firma xyz has birthday, would you like to chance to the contact card?"
    Yes= Open the Contact Card of the Person who has birthday
    I don't know how to write such a function :(
    The Dialoge.CONFIRM says,

    Variable(Boolean) := DIALOGE.CONFIRM (String[,Default][,Value1])

    I don't know how to say, that the card of the birthday person should open.

    Must i set a variable with relation to contact card? but how to filter?
    with an if function?
    Must i write this all in the Dialoge.Confirm function?
    I don't think so.

    Please help me once again

    Thanks,

    Heiko
    secon EDV-Consulting GmbH
    Software | Schulung | IT-Beratung
  • David_SingletonDavid_Singleton Member Posts: 5,479
    ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)
    David Singleton
  • TomasTomas Member Posts: 420
    Imagine you have 31 birthdays today :)

    How many times and how many users will be clicking this joyful message? :)

    What if to consider other alternatives:
    - creating a report to show same information? (if you need to make it more special, create a subscription to get that report daily) - both can be done either in navision, or sql reporting services)
    - actually, anything (and i mean anything - even stuff outside navision) would mean more sense, than actually showing messages/confirmations on logging in to navision ](*,)
  • SavatageSavatage Member Posts: 7,142
    Check that Birthday Monitor from the download section again.

    It appears to list all the people that have a brithday on that day.

    If you wish You could open that form on login to see if any birthdays are happening. If not close form go on about your business.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Heiko_D wrote:
    The customer wants this feature...
    so i hope you can help me a third time :-k

    I searched a lot and have found the Dialoge.CONFIRM function
    If I understand it right, i have with this function the possibility
    to choose yes and no.

    Yes would be to change to the contact card of the contact which has birthday.

    ...

    Heiko

    Google is your friend

    http://www.google.com/search?source=ig&hl=en&rlz=&q=send+birthday+greeting&btnG=Google+Search
    David Singleton
  • garakgarak Member Posts: 3,263
    take a look at savatage's information.

    The confirm message is not a good soloution, better is a form.
    If you have the soloution designer.pdf or now called application developer 1 or 2 there is a lessen about a calendar (or so)

    Regards
    Do you make it right, it works too!
Sign In or Register to comment.