Copied to clipboard

Flag this post as spam?

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


  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Sep 30, 2009 @ 12:58
    Chris Houston
    0

    Can the Umbraco Web Service in v.3.0.6 create a new document without it being published?

    Does anyone know if it is possible to use the umbraco web services in v.3.0.6 to create a new document but not publish it?

    Currently whatever I try to do it always publishes the documents and I just want to create new documents that are not published so an end user then has to manually publish them after editing.

    This is my code:

    var client = new documentServiceSoapClient();
    var newDocCarrier = new documentCarrier
    {
        ParentID = parentId,
        Name = qualName,
        DocumentTypeID = docTypeId
    };

    // I am not adding any properties in this example... but they would be below.
    var docProperties = new ArrayOfDocumentProperty();
    newDocCarrier.DocumentProperties = docProperties;

    int newDocId = client.create(newDocCarrier, "username", "password");

    This creates a new document which is always published.

    So is it possible to do exactly the same, but for the document to be "unpublished" so that an end user has to manually publish it after reviewing.

    Thanks in advance!

    Chris

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Sep 30, 2009 @ 16:03
    Richard Soeteman
    0

    Hi Chris,

    Never used the built in webservices, but if you take a look at the Client tools project you'll see that it's using a custom webservice. That is because you can then use the Full API using your own webservice. So i would suggest you build your own webservice that creates the document and doesn't publish it.

    Cheers,

    Richard

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Sep 30, 2009 @ 16:32
    Chris Houston
    0

    Hi Richard,

    It seems a bit odd if the built in WS does not support creating the document in an un-published state, as no one seems to have been able to answer this I guess I'll need to dig into the old source.

    Thanks for your reply, that is my last resort as I'd hoped to use the built in services to save time, it looks like it might not work out like that.

    Cheers,

    Chris

Please Sign in or register to post replies

Write your reply to:

Draft