Skip to content

Instantly share code, notes, and snippets.

@blacktambourine
Created November 21, 2017 01:55
Show Gist options
  • Save blacktambourine/85164facde52b144e253f5c31bc28563 to your computer and use it in GitHub Desktop.
Save blacktambourine/85164facde52b144e253f5c31bc28563 to your computer and use it in GitHub Desktop.
Sitecore database function to get a field for an item
CREATE FUNCTION [dbo].[SC_GetSharedFieldValue]
(
@ItemID [uniqueidentifier],
@FieldID [uniqueidentifier]
)
RETURNS nvarchar(max)
AS
BEGIN
DECLARE @Result nvarchar(max)
SELECT @Result = value
FROM [dbo].[sharedFields]
where ItemId=@ItemID
and fieldid=@FieldID
RETURN @Result
END
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment