Skip to main content

Posts

Showing posts from August, 2012

How to create new (missing) columns for entities in your Data Export Service Azure SQL database

SharePoint 2010: SPUtility.GetFullUrl(properties.Site, properties.ListUrl) in Custom Workflow and Alternate Access Mappings

While testing a custom SharePoint workflow that automatically sends out emails I stumbled over a small issue that bugged me and our customer a lot. The email sends out some text with an url link to a list item. The problem was that the external url to the server was used only at the beginning of the workflow and later when the workflow continued through some internal trigger the internal server host name was used. E.g.: External Url: http://ext.alegri.eu Internal Url: http://stgalegri I found out the in the alternate access mapping settings the default url was the internal url. I changed the settings to the following:
I have the following explanation for this behavior:
When the workflow is started and the following code is used:
SPUtility.GetFullUrl(properties.Site, properties.ListUrl)

The Site.HostName property will be instanciated with the context of the calling user that open the web site via the external url. This causes the email text with the hyperlink to be send out with the co…