Hot answers tagged

7

Any kind of hardcoded path is, in general, opposite from best practice so opening a SPWeb or SPList object directly from its full server URL is a no-no. To get the SPWeb object, if you are sure your code will always run in your desired web it is perfectly okay to use SPContext.Current.Web. In all other cases, you might want to look at something like the ...


6

I had a similar issue this morning, with an external dataset with around 100,000 records. The way I worked around it was to create a SQL stored procedure to do the Read List operation, rather than querying the data directly. The Read Item operation can still be linked directly to the list, rather than requiring a second stored procedure. On the Read List ...


5

It depends on the "context". In a web part or application page, use SPContext. A lot of example code you see on the web uses a console app for simplicity - these would use the SPSite constructor with a string parameter representing the url. In a Feature receiver you'd use (SPWeb)properties.Feature.Parent. Bottom line is, if the code is being executed ...


3

I had the same issue. My first try was to create an additional Read List operation without the Wildcard filter. I set that as default Read List operation, and created a list based on this. That worked, but my picker in for instance External Columns no longer had my wildcard filter. I then sat my first Read List operation (with the wildcard filter) back ...


3

Try PowerShell if you have access to the server or admin access to the list you need to import into. I will break down the parts of the script you might need as follows: 1. Set up the correct modules for SharePoint manipulation in your PowerShell script. 2. Set up the CSV import file in a variable in your script so that you can access the content of the CSV ...


3

There are plenty of choices when it comes to bringing business data into SharePoint. 1. Business Connectivity Services This is recommended and the most legal way. Just create a web service and attach an external content type to it. Also you can use direct connection to a database. You can find a comprehensive article about BCS in MSDN Magazine: ...


3

You can use Migration Tool for same you can use tool for migration like "Sharegate"(Trial version) For more info http://www.slideshare.net/benjaminniaulin/sharegate-sharepoint-migration-tool


3

All the customizations proposed below will take no more than 5 minutes to implement once you know what to do. SharePoint is flexible, though not very user friendly, and sometimes it's just hard to find the correct button or menu item... Also one more thing: as I understood from your comments, you don't know SharePoint well, so I tried to make the answer as ...


2

My suggestion is to you can do with string format like this... string DateWithHours = String.Format("{0:yyyy-MM-dd H}", yourDateParameter); if you round hours then u can manually check by extract minute part from date. if minute is > 30 then add 1 hour to date.. For more details see these links... http://www.csharp-examples.net/string-format-datetime/ ...


1

.Net doesn't have a type for only date without time, but you can get a DateTime with no time set from any DateTime by accessing it's Date property. If you want to "round" it to the next day if past noon then add 12 hours before getting Date.


1

When you map your list to the network drive you loose the SharePoint information like the unique id. I would suggest that you iterate over the list directly, grab the id and store it in the csv. One question: Is the unique id consistent even after your migration?


1

You must change your query to: "<Where><Eq><FieldRef Name='User' />"+ "<Value Type='User'>"+ currentUser.LoginName +"</Value></Eq></Where>" See the link for details


1

I had a similar requirement and ended up creating a linked server in Sql Server, linked to the DB2, and a "bridge" DB in Sql Server that gets data from the linked server, by exposing it through a view. Then in SP Designer, I created a data source (or BCS external content type) connected to the DB in Sql Server. Hope this helps


1

In SharePoint 2013, you have newly introduced Client Side Rendering / JSLink property in Web Parts which you can use to customize the look and feel of List View Web Part.. Please have a look at below examples: Client-side rendering (JS Link) code samples JS Link for SharePoint 2013 Web Parts–A Quick Functional Primer Using JSLink to change the UI of a ...


1

BCS. The item throttle applies to a single query operation. So, in your BCS model, be sure to include filters on the appropriate columns. These filters will show in the Entity Picker (the button on the list form that looks kind of like the people picker). You won't necessarily get an autocomplete experience like the Bing/Google search box, but your users ...


1

If the intention is to only trigger workflow once and do not allow it to run subsequently, you could use a "Wait for change" action and use an additional field as a flag to be checked upon workflow start. So basically, under "Wait for change" add also an If condition and check whether the flag is set or not.


1

Im just confused why you would use InDesign? to show and hide lists you can either do it by a feature or webpart or aps.net page and have jquery/javascript that attach to the button or better yet use AjaxControlToolkit.dll to do the job for updatepanel, up/down panel popup or not, show/hide list and it goes on and on. If you want you can design it in ...


1

connect to another library in sharepoint 2010 does not exist, they for some reason removed it. But I did find another method being used using sharepoint designer...I dont know if it would be any use to you ;) http://www.youtube.com/watch?v=0SfpgoEUlIw hope it helps :)


1

What John said is true. You ought not directly interact with the SharePoint databases. However, when you state "Now I was asked to have all the data available in a 2007 Sharepoint Server" what it sounds like you actually need here is the Business Data Catalog service available in SharePoint 2007. It allows you to surface and interact with the data in your ...


1

Usually it is suggested to use dedicated accounts for each application. There are pros amd cons in that of course, having dedicated accounts provides more security but adds a bit of maintenance. You should take a look at Secure Store, it might be exactly what you want - if you don't want to create new AD account.


1

A multivalue "person" column is a multivalue lookup field which should support unlimited number of selections. How rendering will work with 1000+ users is then a completely other issue and the time it'll take to validate the 1000+ users on edit will also be a issue


1

In the lack of more details concerning the possibilities would work for you (e.g. looking at custom development or a no-code solution), i would the easiest is to use the BDC via SharePoint Designer to load from external source according to your schema. The major point here is what possibilities you have: could you bulk-export to some data store accessible by ...


1

What about storing it in a cookie?


1

You can accomplish this in several ways depending on the amount of data that you need to share. The basic idea would be to have a central repository on which the web parts can read and write data. Use a Custom List within the site to be read and updated. Custom SQL database. Use Property bags in SharePoint - Read this blog for detailed info.


1

Figured it out without any custom code! I just added this to the function: substring-before(field1, "T") This extracted all the text before the "T"!


1

I'm assuming the application will be running either under some person's ID, or an ID will be created just for that job. In either case, you'll have some ID that you can ensure has permission to access the file so that the job can access the file. For check in/check out, it could just be disabled entirely. I know when I have document libraries that are ...


1

Unfortunately the database model for SharePoint dont have foreign keys, so using ER tools like TOAD Data Modeller and Rational Rose to the database and generate charts is not very useful since you dont get the relations.


1

Try this: DataTable unique =dtnew1.AsEnumerable().GroupBy(row => row["Posttitle"]).Select(group => group.FirstOrDefault()); Add System.Data.Linq reference


1

Business Data is available in SharePoint 2010 Enterprise version. It is not available in SharePoint 2010 Standard version. Link Refernce : http://sharepointpolice.com/blog/2010/05/03/sharepoint-2010-feature-comparison-sharepoint-foundation-2010-vs-sharepoint-2010-standardenterprise/ I suggest you to convert the SharePoint license type to Enterprise if ...



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