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

Forums / Module Builder / Unique field value via IDataEvent ?

Unique field value via IDataEvent ?

4 posts, 0 answered
  1. Tigger
    Tigger avatar
    17 posts
    Registered:
    25 Apr 2016
    02 Jul
    Link to this post

    In the case of Dynamic Modules created via Module Builder, the default "Title" field is unique.

    If I want to make other fields in a Dynamic unique, do I look to use the IDataEvent to do that?

     

    Thanks

  2. Dimitri Cools
    Dimitri Cools avatar
    80 posts
    Registered:
    30 Sep 2016
    04 Jul
    Link to this post
    Hi,
    Thank you for contacting us.

    You can choose another (short text) field as an identifier for your custom content type, but as this refers to the primary key, you can only pick one.
    Could you maybe elaborate on your enquiry or explain what you are trying to achieve? 

    More on dynamic content type:
    http://docs.sitefinity.com/create-a-dynamic-content-type

    Thanks for your cooperation.
     
    Regards,
    Dimitri Cools
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Tigger
    Tigger avatar
    17 posts
    Registered:
    25 Apr 2016
    05 Jul in reply to Dimitri Cools
    Link to this post

    Thanks for the response .... I wanted to have the ability to control entries that would be unique in two fields .

     

    A good example of how to do it is here  ... but I have not been able to find info on how to send an error back to the UI if I want to reject the entry

    http://d10fqi5lwwlsdr.cloudfront.net/developer-network/forums/developing-with-sitefinity-/add-logic-when-user-post-a-blog-post-in-back-end

  4. Dimitri Cools
    Dimitri Cools avatar
    80 posts
    Registered:
    30 Sep 2016
    06 Jul
    Link to this post
    Hi,
    Please have a look at following forum thread also on Handling and adding a new item event:

    http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/handling-an-adding-new-item-event-in-dynamic-module

    You should be able to override the ExecuteOnPublish() method and validate. In there you can throw an exception when a setting will be overwritten. 
    This exception will be shown as a pop-up in the back-end UI.

    Regards,
    Dimitri Cools
    Telerik by Progress
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
4 posts, 0 answered