tag:blogger.com,1999:blog-11045856207939592322024-03-13T20:01:41.180-05:00Pioneering SharePointThis blog is for discovering small tips and tricks on the job and during hobby time about SharePoint. This can include provisioning, assembly code, web parts and controls, and customization through the GUI and SharePoint Designer.Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-1104585620793959232.post-64954800027816385042010-09-18T12:54:00.000-05:002010-09-18T12:54:25.325-05:00Customize List Forms using SilverlightWell I started at a new client a few months ago. They do things a little different. I would like to think I got the job because of my passion for custom field types and custom list forms. But they are going a different direction. We started the project using customized list forms with custom field types, now we've switched gears to Silverlight! So I'm trying to mix Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com1tag:blogger.com,1999:blog-1104585620793959232.post-84186580345431246172010-08-13T11:39:00.000-05:002010-08-13T11:39:12.518-05:00Don't forget your Security Bits!Apparently SecurityBits are important when creating a custom list schema in 2007. I just spent a few hours wondering why I was getting Access denied inside a ListViewWebPart.
It turns out I didn't have SecurityBits. You can list them in your list template, in your list schema main tag, or in the Security tag inside MetaData. But you have to have them somewhere.&Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-19456867706496658062010-06-17T21:48:00.000-05:002010-06-17T21:48:07.044-05:00Customizing a list form at a later time with Rendering TemplatesA while back I wrote a post on how you can customize list forms using Rendering Templates. Since then, I've spoken on the topic and I'm starting to receive feedback. Because of this, I have discovered more secrets on using Rendering Templates. I think you'll like this one. I have more on queue.
You can customize a list form anytime! Not just when you provision a custom list as Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-66478473585504893682010-06-14T20:43:00.000-05:002010-06-14T20:43:56.714-05:00Where did the link to my site go?Have you ever noticed that when you delete a web, the link on the top nav bar disappears. It actaully disappears because the link to the endpoint was deleted. SharePoint verifies the links; this is also how security trimming works.
So back to the problem. You've provisioned a web and you've set it up to inherit the top navbar and to show a tab (link). This link points to Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-472118768201153472010-04-28T07:14:00.000-05:002010-04-28T07:14:27.094-05:00Creating Lists without a Fields collectionI learned a neat trick a few years ago on a way to create lists without redundancy. You might have heard of it and after reading this post it will sound familiar. I'm not the first person to blog about it but I felt it was important.
We all know how to create a list using provisioning techniques: create a list schema
create a list template
create a feature
deploy the feature
activate the feature
Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-81382855565085650962010-04-16T15:44:00.000-05:002010-04-16T15:44:50.611-05:00Funny Business with ListViewWebPartI wouldn't exactly call this a tip, more of a trick. Maybe I'm just doing something wrong but I thought I would share my frustration.
NOTE: I did find a workaround but I would like to know what's really going on underneath, please comment on this. See bottom.
Let's start
There are several ways to provision a ListViewWebPart (LVWP) to a web part page: Designer, web browser, element manifestBrian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-53833305282937631422010-01-26T06:42:00.000-06:002010-01-26T06:42:54.746-06:00Copying the ECB MenuLevel 300
There are two approaches [javascript and CAML] one can take to accomplish this technique. I am taking the low-road; manipulating the CAML directly. If you don’t feel comfortable with writing custom list schema, this could be difficult and frustrating. It’s not hard to do but there’s a technique to creating custom list schema and other blog posts can do a better job Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com6tag:blogger.com,1999:blog-1104585620793959232.post-86499825574727929492009-11-13T17:19:00.000-06:002009-11-13T17:19:33.108-06:00THE correct way to customize formsI've been aSharePoint developer for a number of years. And I thought I knew alot about SharePoint and its inner workings. Wrong! There is so much to this product, it's impossible to know everything. In my line of work, I develop modules for clients. These are features that create some lists, some workflow, some pages, put it all together to solve a business problem. Thats what SharePoint is all Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com12tag:blogger.com,1999:blog-1104585620793959232.post-78761304762780827702009-10-10T14:08:00.000-05:002009-12-10T15:39:05.663-06:00Updating List Forms
BackgroundLately, my project has transitioned in its life cycle from development to maintenance. Now this is important because the techniques I am applying cannot disturb the solution. Once it was deployed to production, the site collection cannot be revamped. So we have to come up with creative ways to get the updated functionality into the existing webs. New webs can use functionality drawn Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-87875975524199371912009-09-17T09:06:00.000-05:002009-09-17T09:06:15.847-05:00False login discovered!BackgroundAt my client, we have unique authentication scheme. They use two directory services. Active Directory drives the windows side but an LDAP implementation drives theverything else. A real heterogeneous environment. Every night, maybe even more often, the AD forest is synchonized with it's LDAP counterpart. LDAP is the system of record not AD. This setup can cause problems especially for Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-37651687090161877892009-09-10T11:01:00.000-05:002009-09-10T11:01:26.299-05:00I need my SPContext nowDon't fret if you have an HttpContext you can create a SPContext. Just use SPContext.GetContext.
SPContext context = SPContext.GetContext(HttpContext.Current);
But what if you want to use this context. If you call SPContext.Current you might not get the right one. The SPContext contains references to alot of Objects like SPSite, SPWeb, as well as SPList, SPListItem, FormContext and others. Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com1tag:blogger.com,1999:blog-1104585620793959232.post-72163245432516555162009-09-01T22:15:00.002-05:002009-09-02T12:43:30.316-05:00Failed to load workflowSometimes SPD just won't load an imported XOML file. Why?Like other people have mentioned clear the AssemblyProxyCache first. But that doesn't always work. Why?It turns out there might be a dependent assembly used in the workflow that wasn't installed on the target system. You can find out by opening the XOML file as text and looking in the root tag. All the namespaces used in the XML are Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-50736342563673184302009-08-31T13:39:00.017-05:002009-08-31T19:12:04.645-05:00DVWP failed to sort my columnsI'm sure some of you have had the pleasure of creating a DataViewWebPart (DVWP) in SharePoint Designer (SPD). You know, the one where you take an existing ListViewWebPart (LVWP), choose tasks, and convert to DataFormWebPart.Anyways, it creates the XSLT for you that behaves almost like the LVWP. You have the capability to sort descending and ascending on certain fields (you set which ones) and youBrian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com9tag:blogger.com,1999:blog-1104585620793959232.post-70553140434878387842009-08-20T08:25:00.006-05:002009-08-20T08:57:51.337-05:00Please SharePoint, leave my assemblies alone!I had the unfortunate experience of bringing the production server down after my latest deployment. Yes, I follow best practices. I wrap all my solutions in a WSP. That's what got me into so much trouble. I guess I really need to change the version number with every new release. Keep reading and you'll see why.When you deploy/upgrade a solution with allowgacdeployment, it takes whats listed Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-44240912996363612572009-08-13T20:02:00.005-05:002009-08-13T20:34:12.041-05:00PeopleEditor doesn't always resolve - really!The other day we were troubleshooting some code that uses a PeopleEditor. You know that great control that lets you select users/groups to include into your custom list. You can use it two ways: You can enter a name or Use the browse popup to find the name. When you use it to resolve a name (click the CheckNames icon), you can enter an Active Directory alias or a full name as it would appear Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-57673958129840465402009-07-16T06:52:00.000-05:002009-07-16T07:16:14.703-05:00Sometimes you can't read a fileThe other day, I was debugging a deployment process. It's pretty simple; just a feature receiver that creates some lists, sets some security, and attaches some workflow. We use Nintex 2007 here. It's awesome. I wrote some code a while back that automates this provisioning process (reads a workflow template file, calls the Nintex web service, publishes the workflow to the list). Well it wasn't Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-48787428536135617912009-04-23T16:23:00.000-05:002009-04-30T11:21:51.155-05:00Sometimes you don't have a SessionI ran into an interesting problem the other day. I had set up some code to cache frequently accessed variables. I had used the Cache object but then discovered it wouldn't ever refresh with a new value unless I setup some type of expiration policy. So then I got the idea to use the Session cache instead. So everything was fine until I tried to refresh those variables. It seemed to be working Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-32490518997173974052009-03-17T15:10:00.000-05:002009-03-17T15:30:38.396-05:00SPException throws exception!This one had me baffled for days.You know, you write some code and then want to relay a friendlier error message back to the user if an exception occurs.Well it turns out that this breaks under certain conditions on your server.You can make SPException break if you do the following:Enable custom errorsTurn on CallStackTurn on AllowPageLevelTraceTurn on debug.Here are the code snippets:<Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-58793753697275407352009-01-22T08:44:00.000-06:002009-01-22T09:31:42.054-06:00A really blank site definitionOk people have been asking for this...I have created a blank site definition, more blank than blank STS Team site. You can't get anymore bare metal than this. I hope someone finds this useful.Here we go!#ONET.XML<?xml version="1.0" encoding="utf-8"?><Project Title="Blank" Revision="1" ListDir="$Resources:core,lists_Folder;" xmlns:ows="Microsoft SharePoint"><NavBars><!-- add Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0tag:blogger.com,1999:blog-1104585620793959232.post-34756324255633522142008-11-16T15:03:00.000-06:002008-11-16T16:22:20.350-06:00Extending Site Definitions with Web FeaturesHave you ever created a site definition with some features and then realized you needed a few more?Have you ever tried to update your site definition with more features and later found out it wrecked your existing webs that used that site definition?Here is a technique that can alleviate that problem.What you need:A site definition, a feature, a feature receiver, a text or xml file, a TextReader Brian L Bedardhttp://www.blogger.com/profile/05914219830660230398noreply@blogger.com0