Friday, June 3, 2011

Silkroad Eprise: Publish page using C# Powercode

using System;
using System.Web;
using DotNetScriptEngines;
using System.Data;
using System.Data.SqlClient;

namespace Custom.EprisePublishPage{
class Publish {

// The 'main' entry point must exist.
public static void Main(String[] args){
EpsClient eps = new EpsClient(args[0]);
String objectId = "183880"; // the page object ID "<$client.URL.ObjectID>";
try
{

EpsEditPage pageToPublish = eps.GetEditPage(objectId);
pageToPublish.Save();
pageToPublish.SubmitForApproval("Some Comments here");
pageToPublish.Publish("Some Comments here");

}
catch (Exception ex)
{
eps.Write(ex.ToString());
}
}
}
}

1 comment:

bhanu said...

It is amazing and wonderful to visit your site.Thanks for sharing this information
Best Mulesoft Online Training
Mulesoft Training

Related Posts Plugin for WordPress, Blogger...