+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom Properties Null Value Issue

Custom Properties Null Value Issue

3 posts, 0 answered
  1. Parimal
    Parimal avatar
    9 posts
    Registered:
    09 Apr 2013
    15 Apr 2013
    Link to this post
    We’ve noticed that even after specifying custom fields as mandatory SiteFinity doesn’t prompt users to specify these values while uploading the content. Because of this sometimes we see null reference exception while reading values using obj.GetValue("FieldName") (We are doing some LINQ operation on entire result set).

    We even tried setting predefined value to avoid null refrence exception but no luck :(

    Please help,
    Parimal
  2. Parimal
    Parimal avatar
    9 posts
    Registered:
    09 Apr 2013
    15 Apr 2013 in reply to Parimal
    Link to this post
    We are able to manage null value exception by using obj.GetValue<string>("FieldName") instead of using obj.GetValue("FieldName").ToString().

    However is there any way I can force users to provide this information at the time of uploading videos/documents?

    Thanks,
    Parimal 
  3. Atanas Valchev
    Atanas Valchev avatar
    414 posts
    Registered:
    04 Jan 2016
    18 Apr 2013
    Link to this post
    Hi Parimal,

    Currently this is not possible. The custom field will appear for editing after the item has been uploaded and is opened for editing, then it will be required and the item cannot be published again until it is filled. 

    I apologize for the inconvenience.

    Regards,
    Atanas Valchev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
3 posts, 0 answered