Copied to clipboard

Flag this post as spam?

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


  • Joakim 8 posts 27 karma points
    Oct 02, 2009 @ 11:26
    Joakim
    0

    Custom datatype help: saving to XML document at page publish

    Hey guys, i was hoping you could help me with a tiny problem,

    I've made a custom datatype that's supposed to send some information to a webservice. However i would like it to only send the information if the user clicks publish, but still save the information when Save is clicked (this works so far).

    Using some of the examples of custom datatypes found on codeplex and here, I've managed to make everything else work, but I can't seem to find the name of the method being called when Save&Publish is clicked?

    In other words, how do i execute my code when publish is clicked?

    Thanks a lot!

    /Joakim

  • Richard Soeteman 4049 posts 12922 karma points MVP 2x
    Oct 02, 2009 @ 13:39
    Richard Soeteman
    0

    Hi Joakim,

    I'm pretty sure that you can't access this from your datatype. Events are the way to go. I've written a few examples how you can use events. What you need to do is subscribe to the Document_BeforePublish event and put your code in there.

    Hope it helps you,

    Richard

  • Joakim 8 posts 27 karma points
    Oct 06, 2009 @ 12:33
    Joakim
    0

    Thanks alot Richard, after som fiddling i figured it out with the BeforePublish event!

Please Sign in or register to post replies

Write your reply to:

Draft