Hi all,
There is an agent on ServerA. This agent wants to get the domain name of ServerA, Not the domain name of agent-executor’s mail server(This means “@domain” could not be used).
Any idea? Thanks.
Hi all,
There is an agent on ServerA. This agent wants to get the domain name of ServerA, Not the domain name of agent-executor’s mail server(This means “@domain” could not be used).
Any idea? Thanks.
Subject: How to get the Domain Name of the server by LS or Formula?
Look at httpurl property of NotesDatabase class.
Subject: RE: How to get the Domain Name of the server by LS or Formula?
or place a hidden from Web Field and call it “Server_name” into your Form …
(search designer Help for CGI & server_name for details … )
Subject: RE: How to get the Domain Name of the server by LS or Formula?
Hi J Velletti, This is a Notes based application.
@servername contains CN/OU/O information. But is O the domain name? for example: serverA/OU1/OU2/Org, but its domain can be “WebOrg”. right?
@NotesURL: for server “serverA/OU1/OU2/Org”, the NotesURL may contain “notes://serverA@OU1@OU2@Org/__8…nsf?OpenDatabase”. But the same problem: is “Org” the domain name of serverA? the domain name is “WebOrg”.
any sugguestion?
Subject: RE: How to get the Domain Name of the server by LS or Formula?
The Domain is also mentioned in the notes.ini, so you can also do the following :
Domainname = notesSession.GetEnvironmentValue( Domain , 1 )
Subject: In my code, GetEnvironmentValue always reads local notes.ini, instead of servers
Thanks for your hint.
My code is in an agent, which is called by action menu. So it runs on client, instead of on server.
In my code, GetEnvironmentValue always reads local notes.ini, instead of servers. ![]()
Do you have any way to read notes.ini on the server?
Subject: RE: In my code, GetEnvironmentValue always reads local notes.ini, instead of servers
Since you have the server name, could you just lookup (either @dblookup or getdocumentbykey) to the names.nsf on the server and get the server document? The domain name should be stored in there (Domain field).
Subject: got it.
Thank you Tom, I implemented it in this way.
Subject: Nobody wants have a try?
Any idea? Very urgent.
If no idea, I have to read the domain field in the server configuration document. It’s a very very stupid way, but seems I have no choice.