Copied to clipboard

Flag this post as spam?

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


  • Clair 36 posts 86 karma points
    Aug 24, 2011 @ 16:27
    Clair
    0

    Print Record

    I'm trying to create a RecordActionType to print a record. I'd like to have it work like the 'Edit Values' RecordActionType, where it opens the record in a new window. I'm trying to figure out how this is done. I've downloaded the Contour Shared Source but its not in there.

    Does anybody know how to do that? I already created the print page, and it works if I type the url in the address bar, not I just need to add it to the record actions.

  • Comment author was deleted

    Aug 25, 2011 @ 09:05
  • Comment author was deleted

    Aug 25, 2011 @ 09:09

    Code snippet of the edit record:

     public class EditRecord : RecordActionType
        {
            public EditRecord()
            {
                this.Description = "Opens the record editor to allow to change values after the record has been submitted";
                this.Icon = "edit.png";
                this.Id = new Guid("461ea480-9334-11df-981c-0800200c9a66");
                this.Name = "Edit values";
                this.JsAction = "window.open('previewFormDialog.aspx?recordGuid=' + selectedContextGuid);";
            }
    
            public override Enums.RecordActionStatus Execute(Record record, Form form)
            {
                //this will never trigger as JsAction overrides the js that would have triggered it
                return Enums.RecordActionStatus.Completed;
            }
        }

     

  • Comment author was deleted

    Aug 25, 2011 @ 09:14

    Sourcecode for all default providers is available on sourcecode tab of the contour project page:

    http://our.umbraco.org/projects/umbraco-pro/contour

    The archive umbraco.core.forms.providers.zip

  • Clair 36 posts 86 karma points
    Aug 25, 2011 @ 14:20
    Clair
    0

    Thanks Tim. this.JsAction is what I needed.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies