Answered by:
Organization ID in Sitemap URL

Question
-
We have replaced the dashboard with a custom page in Sitemap. We are now upgrading to CRM 4 and the inclusion of Organization ID in the path to the custom page is causing problems. What I had done in sitemap was set the Url="../virtualdirectory/dashboardcustom.aspx" because the virtual directory is under the CRM website. The .. to escape from the organization ID that CRM adds. This works fine when CRM initially opens (dashboard is the intial screen). However, when a user leaves the page and then attempts to return to the dashboard from the left hand nav it is attempting to to access the page with the organizationID in the URL again. I.E. the .. is no longer being applied.
Is there a reason it seems to be using a different path on the initial load than it does when you click the nav bar dashboard link? Or how should you access ISV pages with the Organization in the path?
Thanks!Friday, April 10, 2009 6:07 PM
Answers
-
Well just for completeness sake what I ended up doing was not using the ISV folder but instead using an absolute path in Sitemap instead of a relative path. It isn't ideal because there is a dev environment as well as a production environment which will need to maintain seperate addresses. Sitemap is rarely changed however so the trick will be remembering to not overwrite with the wrong address long after I have forgotten that they are different...
- Marked as answer by DavidJennawayMVP, Moderator Monday, June 1, 2009 12:29 PM
Friday, April 24, 2009 3:29 PM
All replies
-
If you place the content under the ISV folder, the orgname processing is not applied.
Matt, MVP - Dynamics CRM- Proposed as answer by Tiaan van Niekerk Friday, April 10, 2009 8:07 PM
Friday, April 10, 2009 7:37 PMModerator -
Hi Matt, thanks for the reply. I have tried copying my code for my site to the ISV folder and pointing my Virtual Directory home directory to the ISV folder. I'm then using a relative path to try to refer to my virtual directory but I'm still getting the Org name tacked onto the URL.
I also saw this thread this thread which claims that all relative paths will have the org name added. Is that true?
ThanksMonday, April 13, 2009 6:23 PM -
Well just for completeness sake what I ended up doing was not using the ISV folder but instead using an absolute path in Sitemap instead of a relative path. It isn't ideal because there is a dev environment as well as a production environment which will need to maintain seperate addresses. Sitemap is rarely changed however so the trick will be remembering to not overwrite with the wrong address long after I have forgotten that they are different...
- Marked as answer by DavidJennawayMVP, Moderator Monday, June 1, 2009 12:29 PM
Friday, April 24, 2009 3:29 PM -
You should pass Organization Name from crm as query string and get it in your application . With use of Discovery Service you will get the organization ID.
G.Goyal
G. GoyalSaturday, April 25, 2009 4:54 AM -
It doesn't seem like that is possible from inside Sitemap. Is that incorrect?Monday, April 27, 2009 1:08 AM
-
Hi Helfon,
Just to add !!
Check out this url
Using Microsoft Dynamics CRM URLs
What kind of page are you placing in your isv folder.
If it is an aspx page, even if the orgname is appended, page would be served properly. We won't get "page not found" error. However if it is an html page, than if orgname is appended in the url, we would get the page not found error!
Regards,
Nishant Rana
http://nishantrana.wordpress.comFriday, May 1, 2009 8:43 AM -
Read This Carefully
SubArea Element (SiteMap)
Specifies the elements displayed in the left navigation pane for each area.
Element Information
Number of occurrences Zero or more. Parent elements Group Child elements Titles XPath //SiteMap/SiteMap/Area/Group/SubArea
Attributes
Name Description Type Required AvailableOffline Controls whether SubArea is available offline. Valid values:
true
falseBoolean No Client Specifies the type of client Default: All
Valid values:
All
Outlook
OutlookLaptopClient
OutlookWorkstationClient
WebMultiple values can be used as long as they are separated by a comma and do not contain spaces.
String No Description Deprecated. Use the Description Element.
String No DescriptionResourceID For internal use only String No Entity Specifies the schema name for the entity String No Icon Specifies the icon to display. String No ID Specifies a unique identifier in ASCII, with no spaces. Valid values:
a-z, A-Z, 0-9, and underscore (_)
String Yes License Deprecated String PassParams Specifies whether information about the organization and language context are passed to the URL. See Passing Parameters to a URL Using SiteMap. Valid values:
0 = don't pass parameters [default]
1 = pass parametersBoolean No OutlookShortcutIcon Specifies the icon to display in Microsoft Dynamics CRM for Microsoft Office Outlook. String No ResourceId For internal use only String No Title Deprecated. String No URL Specifies the URL to render for this SubArea. String No
Remarks
The SubArea element must contain a Titles element and a valid Title for the user language or a value for the ResourceId attribute.
For Microsoft Dynamics CRM for Outlook, titles must be defined through the Titles element, the Entity, or the ResourceId and must be unique within the parent group.
More than one instance of the same pages may occur so you must ensure that each belongs to different combinations of clients and offline modes.
These changes affect the structure of Microsoft Dynamics CRM for Outlook shortcuts as well as the Web client Go To menu.
Example
The following shows an example of how to use the SubArea element.
<SubArea Id="nav_dashboard" PassParams="1" Url="/isv/dashboard/dashboard.aspx" > <Titles> <Title LCID="1033" Title="Dashboard" /> </Titles> </SubArea>
Now read this Its Important to you reg. parameter
Passing Parameters to a URL Using SiteMap
Passing parameters to the target URL for a subArea element in Sitemap is a way to provide the target application with information about the organization and the language context of the user and the organization. All the parameters are passed if the subArea element is configured by using the PassParams attribute.
You can indicate whether a subArea passes the following parameters:
Parameter Name Description orgname Organization Name The unique name of the Organization. userlcid User Language Code Represents the language code identifier that is used by the current user. orglcid Organization Language Code The language code identifier representing the base language for the organization.
Language codes are a four digit Locale ID. Valid Locale ID values can be found at msdn2.microsoft.com/en-us/library/0h88fahh.aspx
Example
Without parameters:
http://myserver/mypage.aspx
With parameters:
http://myserver/mypage.aspx?orgname=AdventureWorksCycle&userlcid=1033&orglcid=1033
Reading Passed Parameters
Passed parameters are usually read in the target .aspx page by using the HttpRequest.QueryString property. For more information, see: msdn2.microsoft.com/en-us/library/system.web.httprequest.querystring.aspx.
Now Your Problem Must be Solve.- Edited by G Goyal Tuesday, June 2, 2009 9:32 AM
Tuesday, June 2, 2009 9:27 AM -
you can use the demonstration tools to edit the sitemap very easily
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=634508DC-1762-40D6-B745-B3BDE05D7012
check the link
Monday, November 15, 2010 8:42 AM