Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simplicio Jison Jr. 24 posts 44 karma points
    May 06, 2010 @ 04:08
    Simplicio Jison Jr.
    0

    PropertyType & ID on T-SQL

    Hi Guys, 

    Does any body know how to get the property Id in T-SQL? this is how I do it on Umbraco API. I want the process to be done on store procedure for a good reason.

     

    Thanks,

    Simiplicio

      DocumentType documentType = DocumentType.GetByAlias("Employee");
      PropertyType propertyMobileNum = documentType.getPropertyType("MobileNumber");
    
      int ix=propertyMobileNum.Id;
    
    
  • Simplicio Jison Jr. 24 posts 44 karma points
    May 06, 2010 @ 04:53
    Simplicio Jison Jr.
    0

     

    I thinks this one will do. Le me know if this one is not the rigth way. thanks

     

    declare @PropertyIdMobile int
    declare @ContentTypeIdEmployee  int
    
    SELECT    @ContentTypeIdEmployee  =nodeId
    FROM         cmsContentType
    where Alias='Employee'
    
    
    
    SELECT    @PropertyIdMobile=ID
    FROM         cmsPropertyType
    where Alias='MobileNum' and contentTypeId=@ContentTypeIdEmployee  
    
    
Please Sign in or register to post replies

Write your reply to:

Draft