How to now the server name

RODRIGUELEVESQUEJR
Member Posts: 13
Hi,
I need to now the name of the server when in Navision.
It would help me to now to witch personne to send a email, when I am in developpement or production?
Can I get some help.
I have tryed EX: string:=ENVIRON('ComputerName') but it gives me the computer name not the server name. Is there a environmental variable to now the server name?
I have tryed with CONTEXTURL but I get an specified an unknown variable message.
Help me please.
I need to now the name of the server when in Navision.
It would help me to now to witch personne to send a email, when I am in developpement or production?
Can I get some help.
I have tryed EX: string:=ENVIRON('ComputerName') but it gives me the computer name not the server name. Is there a environmental variable to now the server name?
I have tryed with CONTEXTURL but I get an specified an unknown variable message.
Help me please.
0
Comments
-
0
-
I am sory I am new to forums.
I have tryed with CONTEXTURL but I get an specified an unknown variable message.
I have the 2.6 version.
Can we do something?0 -
did you download the code? Please tell everyone what your error message is (exactly) we can't guess.
OBJECT Codeunit 50000 Get servername { OBJECT-PROPERTIES { Date=27/02/03; Time=16:20:56; Modified=Yes; Version List=mibuso.com HowTo2; } PROPERTIES { OnRun=BEGIN IF CONFIRM(fctGetServerName) THEN; IF CONFIRM(fctGetServerType) THEN; END; } CODE { PROCEDURE fctGetServerName@1000000000() : Text[30]; VAR ltxtTemp@1000000000 : Text[250]; i@1000000001 : Integer; BEGIN ltxtTemp := CONTEXTURL; IF CONFIRM(ltxtTemp) THEN; i := STRPOS(ltxtTemp,'servername='); IF i > 0 THEN BEGIN ltxtTemp := COPYSTR(ltxtTemp,i + 11,999); i := STRPOS(ltxtTemp,'&'); EXIT(COPYSTR(ltxtTemp,1,i - 1)); END ELSE EXIT(''); END; PROCEDURE fctGetServerType@1000000001() : Text[30]; VAR ltxtTemp@1000000000 : Text[250]; i@1000000001 : Integer; BEGIN ltxtTemp := CONTEXTURL; i := STRPOS(ltxtTemp,'servertype='); IF i > 0 THEN EXIT(COPYSTR(ltxtTemp,i + 11)) ELSE EXIT(''); END; BEGIN END. } }
500 wow I must have lots o free time0 -
Here is the full message that I have when I save the Codeunit 50000 Get Servername with the compiled option checked.
Message =
You have specified an unknown variable.
CONTEXTURL
Define the variable under 'Global C/AL Symbol's.
What can I do?0 -
Starting from Navision Attain 3.01, the C/AL function CONTEXTURL is available. This function returns a context string that defines the current position of the running objects.
This is one of the reasons their are different forums for different versions.
Please do not post in every forum.
Ok, now...Did you search the forum?
Any 2.6 Financial Gurus out there have any ideas?0 -
0
-
How about this?
http://www.mbsonline.org/forum/topic.as ... servername
David Singleton's method of seeing the virtual tables works for me.0 -
You might use table 2000000010. This is the table with the database files in it, not the servername. But maybe it is usefull, specially if you name the DB like the servername. But it only works for a native DB, not for SQL-DB.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
- 320 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