How to pop up form multiple times on opening the company
vyanku
Member Posts: 791
I want to pop up a form at the time of opening company having infomation of birth day of client.
I want this information on FORM not on the message window.
So I create a form and call this form from Codeunit 1.
What I want if today there are two customer's birth day the form should be popup two times with one customers name at a time like message window.
How can do this?
Please suggst.
I want this information on FORM not on the message window.
So I create a form and call this form from Codeunit 1.
What I want if today there are two customer's birth day the form should be popup two times with one customers name at a time like message window.
How can do this?
Please suggst.
0
Comments
-
Why not have a list or tabular type form?
That way you only need to pop up once...NAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
I added a table box on the form and then added a text box in that form . But it shows nothing. If I add only text box on the form then only it shows me the name of one client.
What I write.........OnOpenForm()Name DataType Subtype Length cust Record Customer custname Text 50 wdate Date dayw Integer //for todays day dayb Integer//for custmomers birth day monthw Integer//for todays month monthb Integer//for customers birth month custdate Date wdate := WORKDATE; monthw:=DATE2DMY(wdate,2) ; dayw:=DATE2DMY(wdate,1) ; IF cust.FIND('-') THEN REPEAT IF cust."Date of Birth" <> 0D THEN BEGIN custdate :=cust."Date of Birth"; dayb:=DATE2DMY(custdate,1) ; monthb:=DATE2DMY(custdate,2) ; END; IF (monthw = monthb ) AND(dayw = dayb) THEN BEGIN custname := cust.name; END; UNTIL cust.NEXT=0;
Please suggest any solution.. ](*,)0 -
I have tested this...hope this works for you
wdate := WORKDATE; monthw:=DATE2DMY(wdate,2) ; dayw:=DATE2DMY(wdate,1) ; Count:=1; Cust.RESET; IF Cust.FINDFIRST THEN BEGIN REPEAT IF Cust."Birth Day" <> 0D THEN BEGIN custdate :=Cust."Birth Day"; dayb:=DATE2DMY(custdate,1) ; monthb:=DATE2DMY(custdate,2); IF (monthw = monthb ) AND(dayw = dayb) THEN BEGIN CustName[Count]:=Cust.Name; Count:=Count+1; END; END; UNTIL Cust.NEXT=0; END; NextCount:=1; REPEAT CLEAR (RunTestForm); RunTestForm.GetName(CustName,NextCount); NextCount:=NextCount+1; RunTestForm.RUNMODAL; UNTIL NextCount=Count;
Some new variables
Count - Integer
nextCount - Integer
RunTestForm - The Form that you want to run
Code/Properties of the RunTestForm
OBJECT Form test cust
{
OBJECT-PROPERTIES
{
Date=11/08/07;
Time=[ 6:06:30 PM];
Modified=Yes;
Version List=;
}
PROPERTIES
{
Width=8000;
Height=8000;
}
CONTROLS
{
{ 10012000;TextBox ;2640 ;2970 ;1700 ;440 ;SourceExpr=GVName }
{ 10012001;CommandButton;6490;6600;990;440 ;OnPush=BEGIN
CurrForm.CLOSE;
END;
}
}
CODE
{
VAR
GVName@10012000 : ARRAY [100] OF Text[50];
i@10012001 : Integer;
PROCEDURE GetName@10012000(VAR LVName@10012000 : ARRAY [100] OF Text[50];VAR counter@10012001 : Integer);
BEGIN
i:=counter;
GVName[counter]:=LVName[counter];
END;
BEGIN
END.
}
}
Check this out... \:D/Diptish Naskar
For any queries you can also visit my blog site: http://msnavarena.blogspot.com/0 -
Sorry its not working ...
If we create this form on customer table .Name DataType Subtype Length
cust Record Customer
custname Text 50
wdate Date
dayw Integer //for todays day
dayb Integer//for custmomers birth day
monthw Integer//for todays month
monthb Integer//for customers birth month
custdate Date
wdate := WORKDATE;
monthw:=DATE2DMY(wdate,2) ;
dayw:=DATE2DMY(wdate,1) ;
IF cust.FIND('-') THEN
REPEAT
IF cust."Date of Birth" <> 0D THEN BEGIN
custdate :=cust."Date of Birth";
dayb:=DATE2DMY(custdate,1) ;
monthb:=DATE2DMY(custdate,2) ;
END;
IF (monthw = monthb ) AND(dayw = dayb) THEN
BEGIN
custname := cust.name;
END;
UNTIL cust.NEXT=0;
can we apply filter on the date of birth field by month and day.(monthw,dayw)? How?0 -
Are you sure this is a really good idea? I've worked on clients that have popups & windows when users log in and I tend to only think it's a good idea if really really required.
Normally (i.e. in my experience) it's something thats only specific to a small set of users and if you pop it up for everyone that may annoy users and degrade their user experience. Or it's really more a setup thing that needs to be done once.
If it's a birthday thing is this something that only the HR users in the system would need? Could it maybe be handled differently (i.e. outside Navision through Reporting services or auto publishing of a report thats emailed to key employees?)0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions