Dissappearing window

mark_christs
Member Posts: 156
Dear All,
These are the coding I wrote in the C/AL editor :
SETRANGE(Status,ProdOrderStatus);
IF ProdOrderFilter <> '' THEN
SETFILTER("Prod. Order No.",ProdOrderFilter)
ELSE
SETRANGE("Prod. Order No.");
CurrForm.UPDATE(FALSE);
I select demand is simulated, when I write the prod. order no. in the field prod. order filter, and its status is released, the window is missing because the production order no. doesn't match with selected status, meanwhile I want it return to the windows and put a message in the pop up window : "the prod. order no. doesn't match with status selected", how to make it ? Tks be4hand..
Rgds,
Mark
These are the coding I wrote in the C/AL editor :
SETRANGE(Status,ProdOrderStatus);
IF ProdOrderFilter <> '' THEN
SETFILTER("Prod. Order No.",ProdOrderFilter)
ELSE
SETRANGE("Prod. Order No.");
CurrForm.UPDATE(FALSE);
I select demand is simulated, when I write the prod. order no. in the field prod. order filter, and its status is released, the window is missing because the production order no. doesn't match with selected status, meanwhile I want it return to the windows and put a message in the pop up window : "the prod. order no. doesn't match with status selected", how to make it ? Tks be4hand..
Rgds,
Mark
0
Comments
-
I didn't completely understand your need but I think it will be something like this.
SETRANGE(Status,ProdOrderStatus); IF ProdOrderFilter <> '' THEN SETFILTER("Prod. Order No.",ProdOrderFilter) ELSE SETRANGE("Prod. Order No."); IF NOT FIND('-') THEN BEGIN MESSAGE('the prod. order no. doesn't match with status selected.'); EXIT; END; CurrForm.UPDATE(FALSE);
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Kriki wrote:I didn't completely understand your need but I think it will be something like this.
Tks for your reply. Sorry, but you are very very clever. it's from my heart. I really confused before hand and not know what to write there.
I will try to put and run it. hope my kudos isn't too overload..
Rgds,
Mark0 -
Kriki wrote:...MESSAGE('the prod. order no. doesn't match with status selected.'); ...
Using the above, I can't run it and when i close form designer this message appears (pop up message) :"")" should come here" then the cursor placed precisely between doesn' and t.
I could use it if I change doesn't to be does not. It will be more grammatically rather than doesn't, won't it ??=D>
Rgds,
Mark0 -
mark_christs wrote:Kriki wrote:...MESSAGE('the prod. order no. doesn't match with status selected.'); ...
Using the above, I can't run it and when i close form designer this message appears (pop up message) :"")" should come here" then the cursor placed precisely between doesn' and t.
I could use it if I change doesn't to be does not. It will be more grammatically rather than doesn't, won't it ??=D>
Rgds,
Mark
In case you want to keep it like this, the word "doesn't" should be "doesn''t". If you have a single ' in a string, you should put 2 single ' in it.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Kriki Wrote:In Navision you should create a global textconstant and put the text in it and then use the textconstant instead of the string.
It works good after I create a local but not global. I wrote as follows:
IF NOT FIND('-') THEN BEGIN
MESSAGE(text001);
EXIT;
In the C/AL Local I wrote :
Name ConstValue
text001 The prod. order no. doesn't match with status selected.
But this one :In case you want to keep it like this, the word "doesn't" should be "doesn''t". If you have a single ' in a string, you should put 2 single ' in it.
Rgds,
Mark0 -
mark_christs wrote:But this one :In case you want to keep it like this, the word "doesn't" should be "doesn''t". If you have a single ' in a string, you should put 2 single ' in it.
The problem is that the single ' is used to start and stop a string, so when Navision sees it in a string, he thinks that the string is finished and goes in tilt with the rest of the string. That is the reason it is needed to use 2 single ' in the string.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 321 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions