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

Forums / Sitefinity SDK / New Products Sample - Not Complete?

New Products Sample - Not Complete?

44 posts, 0 answered
  1. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    17 Feb 2011
    Link to this post
    Hi

    I finally found the last problem, I'm really a noob :-).
    I don't realize i have made a mistake in VEnhance path, i don't think folders number change after build.

    Thanks to all for your help.

    Regards,

    Nicolas
  2. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    17 Feb 2011
    Link to this post
    Hi Phill,

    I got my custom moduled registered and working in Sitifinity and now I have another problem. Not sure if you also came across the same.

    When I go to create new item dialog, it loads with all the input fields and I'm receiving 2 javascripts alerts with "Undefined" as the message. And the buttons such as Publish, Draft..etc not appearing on the dialog. The more actions link is also not working. see the screenshot attached.

    Is it a problem with the workflow? I've opened the workflow file in notepad and corrected the workflow file path. previously it was set to a wrong place (ex: C:\Feodorov\Projects\Sitefinity 4\SDK\Samples\CS\Products\ProductsWorkflow.xamlx). Otherthan that I couldnt find anything wrong with the workflow and it is being correctly referenced in the Module.cs file.

    Can you or someone help me please to fix this issue? I cant perform save/edit/delete since I dont have the buttons.

    Thanks!
    Duneel
  3. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    17 Feb 2011
    Link to this post
    Hi,

    in your custom item (in example ProductItem.cs) have you keep the region IApprovalWorkflowItem ?

    #region IApprovalWorkflowItem members
    /// <summary>
    /// Gets or sets the approval tracking records
    /// </summary>
    [FieldAlias("approvalTrackingRecordMap")]
    [NonSerializableProperty]
    public ApprovalTrackingRecordMap ApprovalTrackingRecordMap
    {
        get
        {
            return this.approvalTrackingRecordMap;
        }
        set
        {
            this.approvalTrackingRecordMap = value;
        }
    }
     
    /// <summary>
    /// Gets or sets the current state of the item in the approval workflow.
    /// </summary>
    /// <value></value>
    /// <remarks>
    /// Note that item can be in different states depending on the culture.
    /// </remarks>
    [DataMember]
    [Database(DBType = "VARCHAR", DBSqlType = "NVARCHAR")]
    public virtual Lstring ApprovalWorkflowState
    {
        get
        {
            if (this.approvalWorkflowState == null)
            {
                this.approvalWorkflowState = this.GetString("ApprovalWorkflowState");
            }
            return this.approvalWorkflowState;
        }
        set
        {
            this.approvalWorkflowState = value;
            this.SetString("ApprovalWorkflowState", this.approvalWorkflowState);
        }
    }
    #endregion


    Regards,

    Nicolas
  4. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    17 Feb 2011
    Link to this post
    Hi Nicolas,

    I have the complete IApprovalWorkflowItem members region in my XYZItem.cs file.

    Cheers!
    Dunee;
  5. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    17 Feb 2011
    Link to this post
    Hi

    the WorkflowConfig.config contains your XYZWorkflow after register module ?

    <workflowsTypes>
        <add serviceUrl="~/Workflows/XYZ.xamlx" title="ModuleTitle" resourceClassId="XYZResources" contentType="Sitefinity.XYZ.Model.XYZItem" />
    </workflowsTypes>

    The xamlx file are embedded resource.

    Regards,

    Nicolas
  6. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    17 Feb 2011
    Link to this post
    Hi Nicolas,

    Yes I have an entry in the Workflow.config file as below. ContactsList is my custom module.

    <?xml version="1.0" encoding="utf-8"?>
    <workflowConfig xmlns:config="urn:telerik:sitefinity:configuration" xmlns:type="urn:telerik:sitefinity:configuration:type" config:version="4.0.1160.0">
        <providers>
            <add version="4.0.1160.0" name="OpenAccessDataProvider" />
        </providers>
        <workflowsTypes>
            <add serviceUrl="~/Workflows/Contacts.xamlx" title="ModuleTitle" resourceClassId="ContactsResources" contentType="ContactsList.Model.ContactItem" />
        </workflowsTypes>
    </workflowConfig>


    Thanks
    Duneel
  7. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    17 Feb 2011
    Link to this post
    Hi,

    it's weird i have the same configuration and it's works here.

    Regards,
    Nicolas
  8. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    17 Feb 2011
    Link to this post
    Yes Nicolas, It is weird. I have uploaded the source code of my custom module. Could you please have a look? try registering the module in your sitefinity site. You will have to fix the broken references first.

    You can download the source code from the link below.
    http://www.sendspace.com/file/b0sqj5

    The sample products module works without these issues.

    Thanks,
    Duneel
  9. Nicolas
    Nicolas avatar
    156 posts
    Registered:
    19 Jan 2011
    17 Feb 2011
    Link to this post
    I will take a look to your module, if i found something i cameback to you.

    Regards
    Nicolas
  10. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    17 Feb 2011
    Link to this post
    Thanks and appriciate it Nicolas. Let me know if you find something.

    Thanks!
    Duneel
  11. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    17 Feb 2011
    Link to this post
    Hi Nicolas,

    I figuredout what's was the problem. It was the bad Workflow.xamlx file. There were errors in it. I compared that file with the file in products module and fixed them. Now my module is fully functional. Yepppee!!

    Thanks everyone for your help!

    Duneel
  12. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    22 Feb 2011
    Link to this post
    Guys,

    I need to create a custom module with few fields. I got the products module installed and studied the way it has been implement. I can reuse most of the code in products module to rebuild the new module I need. but I dont want the Title field to appear on the create new and edit forms. Can someone confirm whether it's doable? I believe the Title field is mandatory in any custom module. If not how can we remove that? I removed the field from the XXXDefinitions.cs file and now I'm getting other errors like URL field validation fails at the bottom.

    Thanks,
    Duneel
  13. Duneel
    Duneel avatar
    166 posts
    Registered:
    08 Dec 2010
    24 Feb 2011
    Link to this post
    Hi Phill,

    Is there is a way to findout the backend template markup for the generate Insert view of a custom module? I need to customize the way the individual fields are arranged and want to put some extra logic in the code behind and use that as an external template for the insert view.

    Thanks,
    Duneel
  14. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 Feb 2011
    Link to this post
    Hello Duneel,

    When you install the SDK there is a folder with external templates -C:\Program Files (x86)\Telerik\Sitefinity SDK 4.0\Resources. All templates can be exported with Reflector as well.
    I suggest that you should use custom fields instead of trying to modify the templates. Custom fields can be added from the UI and there is an option to create a custom controls that can be used as a fields in the view.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
44 posts, 0 answered
1 2