5

If you look at the Core Service API documentation, the MetadataSchema property should be of type LinkToSchemaData. public LinkToSchemaData MetadataSchema { get; set; } The way you'd set this in your code is like this: keyword.MetadataSchema = new LinkToSchemaData() { IdRef = meta.Id.ToString() }; Also, you'd want to set the metadata field values as well. ...


4

You can add a keyword, and set the keyword title, key and parent keywords using the following snippet: KeywordData keyword = (KeywordData) client.GetDefaultData(ItemType.Keyword, categoryId, new ReadOptions()); keyword.Title = "Keyword Title"; keyword.Key = "Keyword Key"; keyword.ParentKeywords = new LinkToKeywordData[] { new LinkToKeywordData() { IdRef = ...


3

string[] publishTargets = new string[] { "tcm:0-1109-1" }; This is the problem in your code. Id you are sending is definitely TcmId of publication, not publication target. TcmId of Publication Target ends up with 65537, so TcmId looks like this: tcm:0-XXX-65537. This is the issue you observe when you try to send ID of Publication instead of Publishing ...


3

Following Marko's example of not giving you the exact code, I can propose a different approach. You could utilize the TaxonomiesOwlFilterData class which returns the entire taxonomy in one response in the OWL format (which is basically an XML). That way you do not need to check keyword by keyword but instead search within the xml to find what you're looking ...


3

Well, without giving too much of a solution, you will need to learn to use Core Service API. For that, hopefully, you already have a link to documentation. But in general, here is the high-level tasks which you need to code: get List of all CCategories in an (i guess) Publication. For this you will need to use Filters, to get them. Then for each category, ...


2

What you are looking for is to have the component tcm:13-149625 updated. Since you want the keyword Aromatics & Fibers inserted into the familyKeyword field, you would have to first read the keyword and update the component by inserting a new node which would insert the keyword title to the field. // Parse the component's content into an XML. var ...


2

I'd recommend you go over this code repository which describes how to change any content or metadata here: https://github.com/TridionPractice/tridion-practice/wiki/ChangeContentOrMetadata. But to give you an idea, you'd do something similar to this: // Read the component you want to add ComponentData componentData = (ComponentData)client.Read("tcm:...


1

As per your error message "tcm:30-158461-65 - Unexpected item type: 65", it is clear that the Page Id is not correct and it's type should be 64 inplace of 65. Please check from where the page is coming and correct its type by updating the PageId to "tcm:30-158461-64"


1

Marko is correct about the error and what is causing it, but you can only check for the Publication Target the way he describes if you are on version 2013 SP1 at the latest, or a greater version if you have legacy publishing enabled. If you are on Web 8 and up, you can also publish to: Purpose, which is a string value. To see which Purposes you have open ...


1

Looking at the Core Service CHM document, it appears that the GetDefaultData method expects three arguments to be passed in: IdentifiableObjectData GetDefaultData( ItemType itemType, string containerId, ReadOptions readOptions) Therefore, I think that this line: KeywordData keyword = (KeywordData)client.GetDefaultData(ItemType.Keyword, category.Id); ...


1

ComponentData ComponentContent = null; var ComponentContent = client.Read("tcm:13-7666", new ReadOptions()) as ComponentData; *//to read components* var Keyword = client.Read("tcm:12-6867-10", new ReadOptions()) as KeywordData; *//to read keywords* string keywordTitle = Keyword.Title; *//here u will get the title of the family keyoword* client.Save(...


Only top voted, non community-wiki answers of a minimum length are eligible