Can the CSOM appy Information Management Policies to Content Types?
I'm looking to use client side code to manage the Information Management Policies of Content Types. Can this be done?
Add a policy to a content type.
Copy a policy from one content type to another.
Copy a source policy to update a destination content type and then those changes propogate to the lists/libraries where they are used.
Thanks,
Doug
Hi Doug,
Per my knowledge, we can only use Powershell and server side object model to achieve it.
Here is a simialr thread for you to take a look at:
https://social.msdn.microsoft.com/Forums/en-US/ce04e573-24ab-4a94-ad4e-c9cecb2fc050/can-we-apply-information-management-policy-by-client-object-model-on-sharepoint-2013-online-document?forum=sharepointdevelopment
As a workaround, we can create a web service and use Server Object Model to achieve it.
Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Dennis Guo
TechNet Community Support
Similar Messages
-
About the PIM(Personal Information Manager)
Hi
Hello friends
i will get very important information about the PIM(personal Information Manager)
that manages the personal database in Handheld devices such as PDA,Mobiles,Cells etc
also i heard that it (PIM) should be downloaded seperately i search many times on sun's product web but i don't get the PIM
please tell me where i can get downloaded it the PIM?Well directly from the J2ME PIM website ( [http://developers.sun.com/mobility/apis/articles/pim/index.html|http://developers.sun.com/mobility/apis/articles/pim/index.html] ) is this statement:
"Personal information management (PIM) refers to the ability to manage in electronic form the kinds of personal data that broad classes of users want handy, such as appointment books, contact directories, and to-do lists."
We're talking about accessing the actual PIM applications on the device (i.e. the Calendar, Contact List, etc. native to the specific phone/pda/device).
the javax.microedition.pim package is an optional package, meaning it is not part of the core MIDP/CLDC APIs. So, yes, you have to download a separate package and place the library in your classpath in order to compile on your system.
Now the next problem you're going to run into is "does your target device support this optional package". There is a reference implementation for PocketPC OS from IBM that you can find here: [http://www-106.ibm.com/developerworks/library/j-pda-op|http://www-106.ibm.com/developerworks/library/j-pda-op] . However if you're trying to perform this on a cellphone (for example) the phone's J2ME implementation is going to have to have support for JSR 75 for this to work at all. I don't know where there is a definitive list of phones that support JSR 75, but I believe BlackBerry's with version 4.2 or newer (for example) do support this package. I believe some Motorla, Erickson, Nokia and other phones support this optional package.
I read somewhere that the following line of code should tell you whether a device supports JSR 75 or not:
System.getProperty("microedition.io.file.FileConnection.version"); If this returns null then the system does not. If it returns a non-null string, then it does at some level.
HTH -
Managed metadata columns in document information panel with multiple content types
Hi everyone,
The problem I have is that for custom content types not all managed metadata columns are displayed in Document Information Panel (DIP) for the document in the Office client application.
However, everything works fine with 1 specific content type. Even though the others using exactly the same site columns. The content types are deployed using visual studio to the content type hub, and after this the content types are correctly published to
the site collections, there are no publish issues here.
When I create a document based on the second content type in the same library, all fields are showed in the document information panel, except the managed metadata columns.
Detailed explanation:
Library: procedures
Content types:
- simple procedure (with 4 managed metadata fields and some other text fields)
- procedure with approval (with the same 4 managed metadata fields and some other text fields)
Scenario 1: I add the 'simple procedure' content type to the procedures library as only content type. Everything works fine, and all fields show correctly in the document information panel in Word.
Scenario 2: I add the 'procedure with approval' content type to the procedures library as only content type. Everything works fine, and all fields show correctly in the document information panel in Word.
Scenario 3: I add the 'simple procedure' and 'procedure with approval' content types to the document library procedures (added simple procedure first). When I create a new document based on the 'simple procedure'
content type, everything works fine and he shows all metadata fields. When I add a new document based on the 'procedure with approval' content type, the document information panel shows correctly, except all managed metadata fields. These are not visible at
all. Though they worked perfectly in scenario 1 and 2.
Is this a known issue or is there a workaround for this?
Thanks in advance!
Kind regards, DavyYes!
This problem is solved right now.
My issue was that I'm using custom content types deployed by Visual Studio in the content type hub. To create a managed metadata site column in visual studio, you need to have first of all your managed metadata field, but also a hidden field accompagnied
to make the actual mapping like the example below:
<Field ID="{B654D984-187A-471B-8738-F08F3356CFDA}"
Type="TaxonomyFieldType"
DisplayName="Countries"
ShowField="Term1033"
EnforceUniqueValues="FALSE"
Group="Demo"
StaticName="Countries"
Name="Countries">
<Customization>
<ArrayOfProperty>
<Property>
<Name>TextField</Name>;
<Value xmlns:q6="http://www.w3.org/2001/XMLSchema" p4:type="q6:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{67308AC2-9556-456B-BF9E-43E8F23EBEE6}</Value>
</Property>
</ArrayOfProperty>
</Customization>
</Field>
<Field Type="Note"
DisplayName="Countries_0"
StaticName="CountriesTaxHTField0"
Name="CountriesTaxHTField0"
ID="{67308AC2-9556-456B-BF9E-43E8F23EBEE6}"
ShowInViewForms="FALSE"
Required="FALSE"
Hidden="TRUE"
CanToggleHidden="TRUE"
Group="Demo"
RowOrdinal="0"
/>
</Elements>
VERY important here is that when you create your content type using visual studio, you not only have to add the managed metadata site column in your xml (which let the content type work already perfectly) but also add the hidden field to your content type
xml !! This way, SharePoint knows that when you have multiple content types with the same site columns in the same library, the second content type also need to get the hidden field from this site columns like in the example below!
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Document (0x0101) -->;
<ContentType ID="0x010100571ebc0f478a49d5a775039347ee1535"
Name="Document Location"
Group="Demo"
Description="A content type containing Managed Metadata Column."
Inherits="TRUE"
Version="0">
<FieldRefs>
<FieldRef ID="{B654D984-187A-471B-8738-F08F3356CFDA}" Name="Countries"/>
<FieldRef ID="{67308AC2-9556-456B-BF9E-43E8F23EBEE6}" Name="CountriesTaxHTField0"/>
<FieldRef ID="{f3b0adf9-c1a2-4b02-920d-943fba4b3611}" Name="TaxCatchAll"/>
<FieldRef ID="{8f6b6dd8-9357-4019-8172-966fcd502ed2}" Name="TaxCatchAllLabel"/>
</FieldRefs>
</ContentType>
</Elements>
I'm very happy I found this solution, because in the whole project i'm implementing, this was used a lot!
Special thanks to the blog of @cann0nf0dder (http://cann0nf0dder.wordpress.com/2013/04/01/creating-a-site-column-with-managed-metadata) which let me think about this!
This ticket is answered now! :-)
Kind regards,
Davy -
Using workflows in Information Management Policies
Is it possible to start a Workflow of 2013 Platform Type from within an Information Management Policy? I only seem to be able to see 2010 workflows?
Thanks
J SykesHi,
It is impossible to start a Workflow of 2013 Platform Type within an Information Management Policy.
SharePoint 2010 workflows are the only kind of workflow that's surfaced by Information Management Retention Policy.
Here is a similar post, you can use as a reference.
https://social.msdn.microsoft.com/Forums/office/en-US/0640e051-96db-4916-a7c1-9ffe21d42b73/retention-stage-action-cant-find-associated-workflow?forum=sharepointcustomization
Best Regards,
Lisa Chen
Lisa Chen
TechNet Community Support -
Created column not showing in the Document Library View for a Custom Content Type based on Document
We have a custom content type based of Document Content Type. The OOTB "Created" column does not show up in the view as well as in the Site Settings -> Columns.
But it shows up in the Display Form and Edit Form of the Item at the bottom "Created at " by " " and "Modified by" at by ""
Would anyone know how to make this column appear as part of the view ?
thanks,
HarshHi,
They should by default be possible to add to a view. The only reason they would disappear from the UI if someone has changed the attribute of the Field to hidden = true. You can verify that with PowerShell and if so you can use PowerShell to revert the setting
to false.
$w = Get-SPWeb http://dev13$f = $w.Fields.GetFieldByInternalName("Created")$f.Hidden$f.Hidden = $false$f.Update() -
Hi,
I am using Microsoft ASP.NET TreeView control where I have bound embedded images. Also I have set custom header “x-content-type-options” as
“nosniff” in web.config file.
On hosting the sample containing the above mentioned things in SERVER machine, the images are not visible but its working properly while running sample in local (development) machine.
Kindly provide a solution and find the sample in the below link.
http://goo.gl/6uR2b0
Thanks,
Alagarsamy D.Hi AlagarBala,
Your issue is related to asp.net/web technology and for a better support on this please post your question to the asp.net forum below, this forum is for C# code issues in speicific:
http://forums.asp.net/
Regards,
Fouad Roumieh -
Get items between in the publishingstartdate and publishingend date in a content type.
Hi,
I have a content type that has two site columns publishingStartdate and publishing end date.
The content type is added to a document library.
When I create an item of the content type then it gives two options for publishing start date as immediately and then a date fiel.d
For publishing end date as never and a date control.
Now I want to be able to get only the results which are published as in todays date is in between publishing start date and end date.
But it seems publihsingstart date and publishingend date fields are text type hence I cannot run CAML Query with Greater than and less than.
Is there a way to get the items and run the caml queyHey Dennis,
Thanks for the reply.
But I am facing a strange issue. That is I also want to be able to get only those items contain certain keyword in the title column.
I am using the following query, But it is not giving the right results. Here is the query
<Where>
<And>
<Or>
<And>
<Or>
<And>
<BeginsWith>
<FieldRef Name='ContentTypeId'
/>
<Value Type='ContentTypeId'>{0}</Value>
</BeginsWith>
<IsNull>
<FieldRef Name='PublishingStartDate'
/>
</IsNull>
</And>
<Leq>
<FieldRef Name='PublishingStartDate' />
<Value Type='DateTime'>
<Today />
</Value>
</Leq>
</Or>
<IsNull>
<FieldRef Name='PublishingEndDate' />
</IsNull>
</And>
<Geq>
<FieldRef Name='PublishingEndDate' />
<Value Type='DateTime'>
<Today />
</Value>
</Geq>
</Or>
<Contains>
<FieldRef Name='Title' />
<Value Type='Text'>{1}</Value>
</Contains>
</And>
</Where><OrderBy><FieldRef Name='PostedDate' Ascending='False' /></OrderBy>
But it is giving me incorrect results.
Should I be using joins in SPQuery. -
Custom Action to the Ribbon - Not Associated to a specific Content Type?
Is it possible to create a custom action on the ribbon that ISNT associated to a specific content type?
I want to perform an action that isn't related to a list / item / lib - it should be available regardless of the context of the action I'm performing.
I have this :-
<CustomAction
Id="Steve.SharePoint.Ribbon.SSSCTab"
Location="CommandUI.Ribbon"
RegistrationType="ContentType"
RegistrationId="0x01">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.Tabs._children">
<Tab Id="Steve.SharePoint.Ribbon.SSSCTab"
Title="Custom Tab"
Description="Groups and controls will go in here"
Sequence="550">
<Scaling Id="Steve.SharePoint.Ribbon.CustomTab.Scaling">
<MaxSize...............
If I remove the RegistrationType and ID, the tab doesn't appear at all. With it set as above, the tab is available, but the controls are greyed out unless I am working within a list ....
I'd like to have it always enabled if this is possible?
Thanks
SteveRemoving those 2 should do the trick, try the following:
Remove the RegistrationType and RegistrationID. Redeploy, restart your server, and clear your browser cache through F12 Developer Tools.
Dimitri Ayrapetov (MCSE: SharePoint) -
Which apple id's countries are allowed to access the itunes u course manager?
If I try to access the ITunes U Course Manager I get a message about my country apple id is not allowed. Which countries are?
Hello patrizio_p
Check out the article below to see what content is available for different countries. If you are able to get iTunes U in your countries you should be able to access the iTunes U Course Manager.
iTunes Store: Which types of items can I buy in my country?
http://support.apple.com/kb/ts3599
Regards,
-Norm G. -
Hi,
I am trying to create "View" in a Document Library and need to enable following:
1. Mark as default View
2. Folders -> Show this view : in Folders of Content Type : {Custom Content Type name}
I am using following code which sets "in Folders of Content Type : " to "Folder" rather than selecting custom content type despite passing Content Type ID of custom content type.
code:
var itemContentTypes = clientContext.LoadQuery(web.AvailableContentTypes.Where(ct => ct.Name == viewContentType));
clientContext.ExecuteQuery();
var itemContentType = itemContentTypes.FirstOrDefault();
view.ContentTypeId = itemContentType.Id;
view.DefaultViewForContentType = true;
view.Update();
clientContext.ExecuteQuery();
Please highlight what seems to be missing?
Thanks
SonalHi,
Before you set the content type ID for the view, you need to add the custom content type to the library firstly.
You can add the content type to library using OOTB feature “Add from existing site content types” in library settings or using Client Object Model.
Here is a code snippet for your reference:
var list = context.Web.Lists.GetByTitle(listTitle);
list.ContentTypesEnabled = true;
var contentType = context.Site.RootWeb.ContentTypes.GetById("0x0120");
list.ContentTypes.AddExistingContentType(contentType);
context.ExecuteQuery();
More information about add exist content type using Client Object Model:<o:p></o:p>
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.contenttypecollection.addexistingcontenttype%28v=office.15%29.aspx
Best regards,
ZhengyuGuo
Zhengyu Guo
TechNet Community Support -
Cfhttp and setting the content-type for a request
Hi,
I am trying to set the content-type for a cfhttp request like this (on coldfusion 9):
<cfhttp redirect="no" method="get" timeout="120" url="http://10.0.0.1/test2.cfm">
<cfhttpparam type="HEADER" name="Content-Type" value="application/json; charset=utf-8">
</cfhttp>
// coding on test2.cfm:
<cfset x = GetHttpRequestData()>
<cfdump var=#x#>
// Output on test2.cfm
content
[empty string]
headers
struct
Accept-Encoding
deflate, gzip, x-gzip, compress, x-compress
Connection
TE
Host
10.0.0.1:80
Proxy-Connection
close
TE
trailers, deflate, gzip, compress
User-Agent
ColdFusion
X-REWRITE-URL
http://10.0.0.1:80/test2.cfm
method
GET
protocol
HTTP/1.1
As you can see no content-type is send through. I also tried the sniffer.exe:
GET http://10.0.0.1:80/test2.cfm HTTP/1.1
Host: 127.0.0.1
Proxy-Connection: close
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: ColdFusion
Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
Here you can also see that no content-type was passed through. The sniffer should report back
GET http://10.0.0.1:80/test2.cfm HTTP/1.1
Host: 127.0.0.1
Proxy-Connection: close
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: ColdFusion
Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
Content-Type: application/json; charset=utf-8
But is does not, what do i need todo to set the content-type in a cfhttp request.
Kind regards,
Nebu12Robots - are you sure about your statement that GET method requests cannot have Content-Type headers? I don't think that that is correct. I've always thought that it was valid (maybe unusual, but ...) and this W3C link weems to agree, especially in the context of its comment about what Content-Type means in a HEAD method request: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
The big problem with trying to get around the CFHTTP limitation by using the CGI scope is that the dash is illegal in a CF varname.
There is a custom tag called CFHTTP5 that getsaround a lot of the CFHTTP limitations, including cookie preservation across multiple requests. I haven't used it for a long time (CF5), but it is still actively developed. Costs $50 - http://www.cftagstore.com/tags/cfxhttp5.cfm
-reed -
Preset default value of DropDown based on Content Type selection in the SharePoint 2010 library
Hi,
I have three site content types (Admin, Technical & Well) derived from base content type "Base" and added this content types to "Documents" library. I also have one site column "Category"(Dropdown) with values (Admin, Technical
& Well) which is available in all the content types.
Now, when i try to create a document based on "Admin" content type then "Category" value should be preset to "Admin", similarly when i select "Technical" content type then "Category" should be preset to "Technical"
and same with "well".
Can some one provide me how i can achieve this?
I am working in the SharePoint 2010 environment.
Regards,
ChakradharMy understanding is that , you have to display the category in all the content types.
So in that case create a content type like
Create a base content type -- with column category.
Create a Admin content type based on base content type as parent. By default ,the category column is available in admin content.
Create a Technical content type based on base content type as parent. By default ,the category column is available in Technical content type.
Create a Well content type based on base content type as parent. By default ,the category column is available in Well content type.
Do you want to create using sharepoint ui or code(visual studio)? -
Protocols or COntent type used by the iPod Maps app
I use the Map app on my iPod Touch (2G) all the time. Today I am on vacation and in spite of the fact that I have good WiFi connectivity, two apps will not function at all: The NY Times reader and the Apple Maps app. While you can use Safari to bring up the NY Times website (http://www.nytimes.com) and Google maps (http://maps.google.com), you cannot bring up http://mobile.nytimes.com in Safari.
I believe the local WatchGuard Firewall at this resort is filtering out certain types of content it believes may be somehow destructive. I can see the error message: Unsafe content type "application/xhtml+xml" reported when attempting to access mobile.nytimes.com
As far as the Maps app goes, one cannot bring up any bookmark nor determine one's current location, viz., "Your location cannot be determined." after some delay. I understand that in certain circumstances the message simply implies that the WiFi access point in use may never have been mapped, but the inability to look up any known good arbitrary address implies to me a communications problem.
Anyone know what protocol and/or content type may be is use by the Maps app?If you want to create a message that has both plain text and html versions of the main
message content, you want to create a multipart/alternative message, as described in
this FAQ entry.
If that message also needs to have attachments, you should embed the multipart/alternative
part in a multipart/mixed message, along with the attachment parts.
If the html part needs to reference images included with the message, you would replace
the text/html part with a multipart/related part, as described in this FAQ entry.
Combining all these techniques together can seem a bit complicated unless you understand
recursion! :-) Remember that in addition to creating a body part with a text content type,
you can create a body part with a multipart content type, and use that body part in the same
places you would use a text body part.
As for making sure your message isn't marked as spam, well, you're probably asking in the
wrong place, but the simple answer is to make sure that it's actually not spam! Usually the
structure of the message isn't as important as the content of the message. -
Get the site columns for a given content type c#
Hello,
i want to find the site columns associated with a particular content type in SP2010 using c#.Can anyone pls help me out??using (SPSite site = new SPSite("http://asdasd/sites/asdasd"))
using (SPWeb web = site.OpenWeb())
SPContentType ct = web.ContentTypes["Document"];
foreach (SPField item in ct.Fields)
Console.WriteLine(item.StaticName);
Console.ReadLine();
Regards,
Bubu
http://zsvipullo.blogspot.it
Please mark my answer if it helped you, I would greatly appreciate it. -
Hi all,
I'm using SharePoint Online, but I'm seeing the same behavior in an on-prem 2013 instance as well. My situation is this:
- I've created a document library
- I've created a custom content type and attached a custom document template to it
- I've assigned the custom content type to the document library, and disabled the default "document" option
What I'm expecting to see is that when I browse to the document library and click "new document", that either a) a picklist appears allowing me to specify the document template I want (using the custom template I specified) or b) open the custom
template itself. That doesn't happen - instead, when I click new document I'm prompted to upload a file, which seems to contradict the whole point of using a custom content type/custom document template combo.
Am I missing something? The custom template isn't in the Forms library, which seems to be a problem if I wanted to use the custom document template instead of the default.
Ideally I'd like a menu like the one shown here:
http://social.msdn.microsoft.com/Forums/en-US/59ce3bd8-bf7f-4872-ae76-60d8c81dfc32/display-content-types-on-new-document-button-in-document-libraries?forum=sharepointgeneral, except with me being able to control the list of items that is shown.
Any ideas? Thanks!Hi Brain,
What you have done is by design behavior.
If you want to show the Office document templates list (e.g. below image from your above referenced link) to select when click "+new document" link, this will need to install Office Web App 2013 which provides this feature,
you can new document and see it is using WopiFrame.aspx page, please see more from below article about how to configure OWA 2013 for SharePoint 2013 on-premise.
http://technet.microsoft.com/en-us/library/ff431687(v=office.15).aspx
Thanks,
Daniel Yang
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]
Daniel Yang
TechNet Community Support
Maybe you are looking for
-
Swing Screen size changing in 1.5
we developed swing screen in jdk1.4 based on the JInternalFrame. The screen is fit well with in the MDI. But jdk1.5 it looks not fitting. Anybody have idea what is the issue.
-
Nested tables don't look right in design mode
When I view www.akashhealingcenter.com with IE or Safari, everything looks fine. However, when I open the page in DW 2004, the tables don't look correct while in design or code/design mode. I've driven myself nuts trying to find out what I can do so
-
Transaction MIGO and J1IEX_P
Hi All Experts, I am using J1IEX_P for posting excise data and for creating part2 of it. I have developed a y transaction to post GR w.r.t. PO without excise data and I am trying to post excise data using BDC for transaction J1IEX_P It works fine, wh
-
Long black wire from ant socket in rear i want to know where the other end goes in front S5710f PC
I have a long black wire that is connected in the rear to a part that serves the antenna. The other end goes to the front of the PC. It came off when I removed the hard drive and dvd player. I have the pavilion s5710f.
-
Hello again! This, I believe, is a more serious problem. I would prefer not to use Time Machine and keep doing as I've done when I was using my deceased PPC iMac: cloning my internal HD onto an FW-HD and updating the clone as needed. In order to do t