18
You need RepositoryLocalObjectsFilterData, this filter will behave differently if you specify properties, like ItemIds, but without setting any properties you will get all checked out items in the system (provided you have enough permissions.)
18
Install the module
Get the .psm1, .psd1 and DLL files from the project. You can also copy the CoreService DLL from the %TRIDION_HOME%bin\client\CoreService folder on your Content Manager
Create a directory C:\Users\username\Documents\WindowsPowerShell\Modules\CoreService C:\Users\username\Documents\WindowsPowerShell\Modules\Tridion-CoreService
Copy the ....
17
You need to use RepositoryItemsFilterData:
var filter = new RepositoryItemsFilterData();
filter.ItemTypes = new[] {ItemType.Schema, };
filter.Recursive = true;
var schemasXml = ClientAdmin.GetListXml("tcm:0-2-1", filter);
You can also use OrganizationalItemItemsFilterData in the similar way, but on the BuildingBlocks level
17
Via core service you can retrieve PublishTransactionData object, which contains all info about transaction itself:
PublishTransactionData transaction = (PublishTransactionData)Client.Read(transactionID, new ReadOptions());
PublishTransactionState transactionState = transaction.State;
DateTime transactionStateChange = transaction.StateChangeDateTime;
string ...
16
The Content Manager Core Service API Reference Guide shows ICoreService2011.GetList takes two parameters:
TCM URI (or WebDAV URL) as a string
a Tridion.ContentManager.Data.SubjectRelatedListFilterData filter
However, there's a remark that "Currently only OrganizationalItemAncestorsFilterData filter is supported."
The SubjectRelatedListFilterData (abstract)...
15
Yes and no, you will not be able to copy the item directly to a different Publication using the Copy or Move methods (at least I would expect that to fail, as the CMS doesn't support cross Publication copy/move actions).
But you can use the Core Service to create a new item and populate that with the content of your original item. This will mean you get a ...
15
Looks like you need to add a resolve instruction object to your publishing.
I did something similar when I wrote the PagePublish Power tool (you can view the full code here: https://code.google.com/p/tridion-2011-power-tools/source/browse/trunk/PowerTools.Model/Services/PagePublisher.svc.cs)
The main bits you need are:
The call to publish :
coreService....
14
You need to cast LocationInfo to PublishLocationInfo, something like this:
((PublishLocationInfo)page.LocationInfo).PublishLocationUrl
13
Yes - the core service supports publishing. Have a look at:
ICoreService2011.Publish
you can call it with the following signature:
IEnumerable<PublishTransactionData> Publish(
IEnumerable<string> ids,
PublishInstructionData publishInstruction,
IEnumerable<string> targets,
Nullable<PublishPriority> priority,
...
answered Mar 21 '13 at 21:50
13
Edit: just re-read your question:
if (compData.BluePrintInfo.IsShared == false)
{
Console.WriteLine(component.Attribute("ID").Value);
}
That should print for Components local to the current context publication and those that have been localized.
answered Apr 6 '13 at 18:03
Rob Stevenson-Leggett
7,32833 gold badges2020 silver badges4949 bronze badges
13
This is a great example of the evil that is the "As" cast
If you wrote your code like this:
var configuration = (NameValueCollection)ConfigurationManager.GetSection("custom.events");
Instead of a Null Reference exception, you'd get an Invalid Cast Exception when GetSection returns a ConfigurationSection. Of course, you should still implement a null ...
13
Pass the WebDAV URL in the id parameter of IsExistingObject. Most (if not all) places the core service accepts an id you can use either a WebDAV URL or a TCM URI.
Notice you can read an object so you get all WebDAV URLs instead of TCM URIs as well, simply set the ReadOptions.LoadFlags to LoadFlags.WebDavUrls.
13
Nuno had started this topic for Tom.net in another question: Getting additional keyword information from item Xml?. It's the same for Core Service.
Need to use LoadFlags as follows:
ReadOptions readOptions = new ReadOptions();
readOptions.LoadFlags = LoadFlags.KeywordXlinks;
...
var pageData = (PageData)client.TryCheckOut(id, readOptions);
answered Oct 24 '13 at 20:32
Nickoli Roussakov
18.4k44 gold badges2828 silver badges6161 bronze badges
13
The LoadFlags differs a lot than say the ListBaseColumns enumeration, in that its actually a flag based property and not just a standard enum. While ListBaseColumns allows you to choose only ONE of the options, the LoadFlags lets you add mix and match by choosing one or many of the options.
When you create a new ReadOptions(), the LoadFlags property is set ...
13
You'll need LoadFlags.Expanded, and then you can get the items from the PublishContexts.
I've just done a little POC with the following code and a published Structure Group and both resolvedItems and processedItems arrays have four items in them.
void Main()
{
ReadOptions opt = new ReadOptions() { LoadFlags = LoadFlags.Expanded};
string ...
answered Sep 1 '17 at 11:59
Jonathan Williams
14.4k11 gold badge2121 silver badges5858 bronze badges
12
I have never had to do this, but I think that this can be done through the API. The fact that you are getting this error is a good sign!
In Lucene (which Solr is based on) the maxClauseCount exceeded error is normally because the number of terms/unknowns in your query makes it very 'vague'. I believe that the value can be increased in configuration. ...
answered Mar 25 '13 at 16:11
Jonathan Williams
14.4k11 gold badge2121 silver badges5858 bronze badges
12
From the Content Manager Core Service API Documentation the following search scopes are supported:
For searching system wide, leave SearchIn set to null
For searching within a Repository/Publication, set the value of SearchIn to that specific RepositoryData
For searching within an organizational item only (one level), set the value of SearchIn to that ...
12
The Event System is one of two official places where you can (and should) use TOM.NET in Tridion 2011 / 2013 (the other place being C# Templating).
So you should not use Core Services here as they are intended for external applications only (such as the Console application you wrote).
12
The reason you are seeing this error is because you are creating a new Multimedia Component using the Create method. When creating a new multimedia component, it looks at the BinaryContent.UploadFromFile property to upload the binary from a file path. If you look at your compData.BinaryContent.UploadFromFile property, its actually not set, so you are just ...
12
Looks like I have to set the MetaDataSchema to an "empty" LinkToSchemaData object instead of null
var organizationalItem = (FolderData)client.Read(organizationalItemID, new ReadOptions());
var emptySchema = new LinkToSchemaData();
emptySchema.IdRef = "tcm:0-0-0";
organizationalItem.MetadataSchema = emptySchema;
organizationalItem = (FolderData)client.Save(...
12
The CoreServiceFault error codes are not documented in the API documentation and I think the list of error codes is not in the Tridion.ContentManager.CoreService.Client.dll either.
Maybe this could be explained because it is up to the Core Service to throw the fault, the client cannot have a complete list of all fault codes.
I think you should check e....
12
You can access the error code by catching the exception as FaultException<CoreServiceFault> and then accessing the Detail property. For example:
try
{
client.Delete(itemId);
}
catch (FaultException<CoreServiceFault> ex)
{
switch (ex.Detail.ErrorCode)
{
case "PermissionDenied":
// Do something specific to the user ...
12
How about:
client.IsExistingObject(uri);
12
The event system code loads when the Tridion Content Manager Service Host service loads, and you can see this in the Windows Event Viewer. As each event handler loads you will see the status showing that the TCM Extension has been initialized.
or
11
You should be able to grab the endpoints (and binding settings) from the file %TRIDION_HOME%\bin\client\Tridion.ContentManager.CoreService.Client.dll.config on a server with Tridion installed on it.
Mihai Cădariu also has a good post Core Service Client Sample Code on how to programmatically instantiate the client without defining the endpoints and bindings ...
11
How do you connect to the core service? Are you using a netTCP binding or a wsHttp/basicHttp binding? In case of the former the app.config file would be TcmServiceHost.exe.config and for the latter it would be web.config in %TRIDION_HOME%\webservices...
11
After running some test, it appears you can pass in a WebDav path to the Category, although the webdav path is in no means intuitive, it takes the format, /webdav/publication name/category name/
CategoryData category = (CategoryData)_coreService.Read("/webdav/publication name/category name/", defaultReadOptions);
thanks Ibrar Hussain for pointing me in ...
11
You can only use ECL URIs in the following places:
1) Client side (so in the Anguilla JavaScript code)
2) In DataExtenders placed after the ECL data extenders.
3) In the ECL API (accessible from for example templates)
The Tridion core service simply do not know what an ECL URI is. So your links will be treated as unmanaged links - and unmanaged links do ...
11
Assuming you are using Tridion 2011/2013, Page Metadata can be read in several ways.
Templates
@@Page.Metadata.field@@
(Dreamweaver Syntax)
ItemFields metaFields = new ItemFields(page.Metadata, page.MetadataSchema); (TOM.Net)
Event System
ItemFields metaFields = new ItemFields(page.Metadata, page.MetadataSchema); (TOM.Net)
Core Services
PageData page = ...
11
TCM URIs are not guaranteed to be the same across systems (quite the opposite, in fact). They are basically assigned in the order you create items. So sometimes, items might have the same URIs because they are created by the system at installation time -- but you cannot rely on it.
Anyway, what you want to do is ask the system for the Schema ID. For that, ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
core-service × 5592011 × 107
2013 × 72
2013-sp1 × 61
web8.5 × 40
sdl-tridion × 34
cme × 31
web8 × 30
publishing × 26
event-system × 20
workflow × 19
schema × 19
powershell × 18
content-manager × 17
java × 13
c# × 13
ecl × 12
2011-sp1 × 11
tom.net × 11
xml × 10
2013-sp1-hr1 × 9
keyword × 9
gui-extensions × 8
database × 8
publishtransaction × 8