Questions tagged [c#]

C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.

Filter by
Sorted by
Tagged with
0 votes
0 answers
52 views

How to get groups members in sdl tridion using core service in c#

I trying to get the group members from cms. I have tried this code it gives all users how to get the group members. I want to get the members from the admin group I know the tcm id tcm:0-2570-61168 ...
ketan patil's user avatar
1 vote
1 answer
50 views

Get page url from Link Field on a component using SessionAwareCoreServiceClient C#

I have a link field and XML looks like the below. Using SessionAwareCoreServiceClient c#; I would like to get the page URL for "tcm:99-99999". "tcm:99-99999" is a component "...
FHN's user avatar
  • 121
0 votes
1 answer
87 views

SDL on save component check the values in c#

Hello Friends I am trying to check or print the component values after the saving event is triggered. I want to check on each component save. User added the www.blahblh.com URL or not then take action ...
ketan patil's user avatar
4 votes
1 answer
54 views

What is the recommended best practice for C# Workflow using External Activity for Logging and Configuration?

I have a c# workflow using an external activity assembly uploaded into a TBB. Currently I have a logging class to write to a hard coded file path in the DEBUG build. The RWS example documentation does ...
Chris Mills's user avatar
  • 2,221
4 votes
1 answer
97 views

Restrict publishing of Linked component within Parent Component using C# Template

Restrict publishing of Linked component withinn Parent Component using C# Template We have a dynamic component template and I want to restrict the Publishing of Linked-Component which is within Parent ...
Sunil Bahmanapad's user avatar
3 votes
1 answer
205 views

How to retrieve GUID from files for Tridion docs SP2 via WCF?

I've been able to get my personal user information via C# -- WCF via https://docs.sdl.com/801922/351949/sdl-tridion-docs-13-sp2/using--svc-web-service-in-c--for-------------ishsts. However, there is ...
abgup's user avatar
  • 31
1 vote
1 answer
152 views

C# how to add values in ItemFields inside EmbeddedSchemaField of a STUB component

I have an embedded schema for a STUB component metadata field which has 4 fields and marked as "Allow Multiple Values", along-with other fields in SDL Tridion. I am using SDL Tridion Web 9.0....
Sankar's user avatar
  • 51
1 vote
0 answers
38 views

How to throw exception and abort to publish an item in event handler

I want to stop publishing a structure groups for certain user groups. I'm able to catch the structure group and filter per the desired groups, but when I throw the exception, nothing happens and the ...
Ignacio Tome's user avatar
1 vote
4 answers
77 views

Event Handler get the user who throws the event

I need to avoid certain group to publish a structure group but I don't know how to get that user to check if belongs to a certaing group. This is the code I have: public ...
Ignacio Tome's user avatar
0 votes
1 answer
40 views

how to get a string by using substring? [closed]

my following string <Content xmlns="http://www.kkk.com/HTMLMeta"> <title>Aftersales Marketing Solutions | kkk markit</title> <metaDescription>Helps manage key ...
Jeevitha's user avatar
  • 448
0 votes
2 answers
149 views

Get MIME Type of Multimedia Types based on file extension using TOM.NET (.NET Templating)

Recently I recevied client business requirement to get MIME Type of Multimedia Types item based on extension (External Url) from Tridion using C# Templating. Read all Multimedia Types from ...
Sudhakar Rao's user avatar
  • 1,771
3 votes
1 answer
204 views

Connect to ECL via .NET giving permission issue

Trying to connect to Tridion via ECL WCF api but getting permission issue. Here is my code: EndpointAddress eclServiceEndpoint = new EndpointAddress("net.tcp://localhoast:2660/...
Sankar's user avatar
  • 51
0 votes
1 answer
51 views

Does DXA support extended RichText Models? Is this by design?

I already reported/asked about a similar issue with extended Keyword Models here: Does DXA support Extended Keyword Models? The same problem occurs if we try to extend from Sdl.Web.Common.Models....
Jaime Santos Alcón's user avatar
2 votes
1 answer
103 views

Does DXA support Extended Keyword Models?

I am using dxa 2.2 (.net) and I created a custom Keyword Model BaseKeywordModel that extends KeywordModel. When DXA tries to map a published component that has a keyword field to a model that uses the ...
Jaime Santos Alcón's user avatar
3 votes
3 answers
900 views

"OutputStream is not available when a custom TextWriter is used" error when returning FileStreamResult through a view with @Html.DxaEntities()

I have a controller action which should return a FileStreamResult. This action is triggered by a button click on a "Downloads" page. public class SoftwareUpdatesDownloadController : BaseController ...
Bartosz's user avatar
  • 153
1 vote
1 answer
69 views

How to make a publishing object fail when some custom validation criteria is not met using SDL Tridion publish plugin

I want to make the publishing status as failed when a custom validation is not passed in SDL publish plugin. Anybody know which is the API method I need to use to make the publishing object failed or ...
user3165851's user avatar
0 votes
1 answer
71 views

Is there any standard solution for Blueprint structure to be fetched, for all publications in a CMS?

For our Web 8.5 implementation, we have a requirement to fetch the complete Blueprint structure using C# TBB's. We do have an implementation that uses Metadata Schemas to fetch the Publication details ...
NewUser's user avatar
  • 91
7 votes
1 answer
106 views

How to Properly Dispose TopologyManagerClient?

We are using the Tridion.TopologyManager.Client assembly in our custom C# application to interact with the Topology Manager items. When I look at the assembly (version 8.5.0.466), I don't see any ...
Sabarish Senthilnathan's user avatar
2 votes
3 answers
90 views

DXA 1.7 .NET How to get Target Groups in PageModel

I am trying to use Target Groups in my site. I've just created one, published it and added it in one of the components of the page: The problem is that in the DXA I cannot see anywhere the ...
Mer's user avatar
  • 123
1 vote
2 answers
128 views

DXA Issue mapping ComponentLink fields to Model c#

I have created a component and added it in a page and mapped all in my DXA. The problem I'm having is that when I call ContentProvider.GetPageModel(pageUrl, WebRequestContext.Localization, true) to ...
Mer's user avatar
  • 123
2 votes
2 answers
89 views

Which is better performance wise : Razor TBB or C# TBB?

I have around 50 lines of code in multiple page templates. I am not able move it to a component template as I need component and template ID from page and render some text from the components in ...
Rakesh Choudhary's user avatar
2 votes
1 answer
40 views

not able to read text field value provided as default value in a parameter Schema in C# TBB

I created one Parameter Schema and added one text field testText, and assigned 9 as the default value for that field in schema. I have assigned this parameter schema to my TBB in CMS. Now i am trying ...
SDLBeginner's user avatar
4 votes
0 answers
47 views

Postback is not working when it is into a dynamic Component Presentation

we are migrating from Tridion 2011 to SDL web 8.5 and we found that a simple LinkButton is not causing the postback (we are using C#). A note here is, we have other pages with postback working, but ...
Carolina's user avatar
  • 467
1 vote
1 answer
124 views

How can I get a Localization object to query a different Publication

I'm new to DXA and faced an unknown while fetching DCP (or to say EntityModel) from other Publication. I've a pre populated Localization object which points to current Publication/site context. How ...
Rohan Gadiya's user avatar
4 votes
2 answers
176 views

CoreService filter with SchemaPurpose and Recursive not working

I'm using Core Service API to find all component schemas within a folder recursively. This is the code. OrganizationalItemItemsFilterData filter = new OrganizationalItemItemsFilterData(); filter....
Diego Rodríguez's user avatar
4 votes
2 answers
224 views

Read TCM IDs of multi-value embedded field using .NET Core Service script

I am trying to read the TCM ID from a multi value embedded field using Core Service. I would prefer to avoid using XML and string manipulation as much as possible and thought this was doable using the ...
G. Robb's user avatar
  • 315
0 votes
2 answers
85 views

sometimes _client.IsExistingObject(id) returns false for . and /

_client.IsExistingObject(webdav URL of folder) returns false when i try to search folder with name "." and "/" which already exists in the folder where i am searching
prathyusha kyatham's user avatar
2 votes
3 answers
90 views

"Sealed" Keyword Equivalent/Similar functionality in Tridion | Stop Inheritance from Parent Publication to Child Publication

Working as a regular C# developer, I was experimenting around the "Sealed" functionality of C#. So, while using Sealed, Child class CANNOT override Parent class Method. So, in Tridion, Is it ...
D Simm's user avatar
  • 95
4 votes
1 answer
48 views

Tridion.Logging missing one of its dependencies

I am having issues finding the proper dll reference for Tridion.Logging. Currently I am referncing/using: using System; using System.Text; using System.Text.RegularExpressions; using System....
Robert Stull's user avatar
2 votes
0 answers
93 views

Using Ajax to submit a form and returning a confirmation page

I am trying to submit a form through an ajax process : @using (Ajax.BeginForm("SendEmail", "Form", new AjaxOptions { UpdateTargetId = "replace", InsertionMode = ...
Payam 's user avatar
  • 21
3 votes
1 answer
277 views

c# Tridion 2011 How to get metadata selected keyword from a component

In Tridion 2011 I have a componen in which in the metadata fields has a keyword with different values. How should I get the selected value in c#. I tried the next but I get the name of the key not the ...
Ignacio Tome's user avatar
4 votes
1 answer
154 views

Schema with a component link with the same schema mapping problem

I am a young tridion developer with not much experience. I am using Tridion 2013sp1 and creating a new MVC web application in C#. I would like to create a menu in which each element could be a '...
Domingo Rodriguez's user avatar
2 votes
2 answers
188 views

User creation using core service on Tridion 2013

I am trying to automate few daily tasks for some of Tridion admins. We have 800+ publications 600+ users and more than 1000 groups. So, I am trying to automate user creation. Recently we have migrated ...
Sankar Sengupta's user avatar
-1 votes
2 answers
501 views

How to debug SDL tridion code?

I am new to Tridion back end coding. I have used the logger for the debug. But I didn't get much information from there. Can anyone please let me know the most common way to debug the code? I am ...
vids's user avatar
  • 135
4 votes
2 answers
237 views

How to assign the value of a component link field to an XML element?

if (currentComponent.Schema.Title == "dtd_link_item") { var linkComponentFields = currentComponent.Fields(); var element = new XElement("SiteMapNode"); element....
user1576's user avatar
1 vote
1 answer
243 views

Get the latest version info of all the items in tridion using core service

Using core service want to get only ther latest version of all the items in tridion. I have tried in this way:- if (itemType.Equals("Folder")) { type = ...
k951's user avatar
  • 31
0 votes
2 answers
170 views

Is there way to call Dreamweaver Mediator from C# TBB in Tridion?

I have Dreamweaver code in one text block as string. What i need is will it be possible to call Dreamweaver mediator from C# TBB and pass the string in text block in Tridion
Anand Natarajan's user avatar
1 vote
2 answers
200 views

Structure groups hierarchy to be used for parent child relationship

I have a scenario where I have components with parent-child relationship. For instance, a news can have multiple child news component. The pages for each news will be created under its parent news. ...
Saurabh Mehndiratta's user avatar
2 votes
1 answer
113 views

Registering Jscript on a Tridion-generated page

I'm attempting to register some javascript on a Tridion-Generated page via a user control. I've created a page object that uses a generic aspx page template. The TBB for the page template contains ...
Freq's user avatar
  • 317
1 vote
1 answer
172 views

Tridion Interacting with the Application Monitoring Web service

I need to make some windows service that will monitor Tridion health meaning that it will use Tridion Monitoring service. Inside of documentation on SDL live content there is one section explained: ...
Jana27's user avatar
  • 31
1 vote
3 answers
250 views

Want to migrate content and page from Tridion to IBM WCM

Want to migrate content and Pages from the Tridion to the WCM. Here need is the content and page source from the CMS. Want to read the Source and store it on the local machine How to proceed with ...
k951's user avatar
  • 11
-3 votes
1 answer
80 views

What is the best approach to read the "Component Source" from the CMS

Want to read the Component Source form the Tridion CMS and want to store each component source on the CMS server or local machine How should proceed with it still don't have clear idea which version ...
k951's user avatar
  • 1
2 votes
3 answers
277 views

CoreService: Upload image to Tridion fails sometimes. Unable to open uploaded file

I am trying to upload an image to Tridion using CoreService. Upload is done using streamClient.UploadBinaryContent. After upload I want to create an MultiMedia component from it. The code works fine ...
Moe's user avatar
  • 21
3 votes
3 answers
412 views

What's the benefit to use VS2012 instead of VS2010 when using Tridion 2013

I know VS2012 is able to use .NET framework 4.5. VS2010 can handle till .NET 4.0. I've seen the changelog between the frameworks, but is there any advantage according the use of Tridion 2013 when ...
Harmen's user avatar
  • 598
2 votes
1 answer
200 views

How to get the list of all component templates from the publications

I want to get the list of all the component templates in .net assembly and push those component templates to the DWT. Got the publication webDav url but how to get the list of all component templates ...
Doors's user avatar
  • 45
0 votes
2 answers
446 views

How to get the component template web dav url from CME in C#

How to get the component template web dav url from tridion using C#. After fetching that CT url passing to the folder object. Right now i'm using the hard-coded path, but in the future it may won't ...
Doors's user avatar
  • 45
0 votes
2 answers
250 views

How to return the component template id based on the name of the component template

I want to make it generic method if we want to read the component template id based on the component template name for any publication or folders it should work. Need to be done using C# and want to ...
Doors's user avatar
  • 45
1 vote
1 answer
510 views

How to read the component the parameter schema field

Created Schema A which has field called keys which is embeeded schema type. The embeeded schema consists of two fields called name and value. Created Component A using schema A. created parameter ...
Doors's user avatar
  • 11
0 votes
0 answers
113 views

How to read the component path field using parameter schema in c#

I want to read the component path using parameter schema and want to assign that parameter schema to the tbb.
Doors's user avatar
  • 9
0 votes
0 answers
117 views

How to read the values from the parameter, embeeded schem in C#

I have created component using schema A it consists of embeedded schema type. The embedded schema has two fields the keyname and keyvalue. Created parameter schema which contain the field called ...
k951's user avatar
  • 41