Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Business Connectivity Services in SharePoint 2010 by Scot Hillier, Brad Stevenson
This is the forum to discuss the Wrox book Professional Business Connectivity Services in SharePoint 2010 by Scot Hillier, Brad Stevenson; ISBN: 978-0-470-61790-8
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Business Connectivity Services in SharePoint 2010 by Scot Hillier, Brad Stevenson section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 24th, 2012, 01:03 PM
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2010
Posts: 21
Thanks: 1
Thanked 0 Times in 0 Posts
Default .NET Assembly and TypeDescriptors...

Hey all...
Have been fighting with a .NET Assembly and two entities. The entities are fairly run of the mill database tables in SQL Server.

For a few particular reasons, I switched to a .NET Assembly using the Entity Framework to access the two related database tables. I'm also using POCO objects (simple C# classes) exposed to the BDC model rather than directly passing the EF objects to the BDC model. I did this because I kept running into road blocks with the EF and the SharePoint model.

Anyway, at this point, using my .NET Assembly and my POCO classes, I'm finding that the SharePoint GUI (External List connected to the External Content Type) is very sporadic when responding to my typedescriptor entries.

In this particular example, I wanted to set the "CompanyName" field for the company entity to required and, set a maximum size to 50 characters.
So, per the documentation (all over the web) I was able to locate, I added two custom properties to the ReadItem method (specific finder) as follows:

<TypeDescriptor Name="CompanyName" TypeName="System.String">
<Property Name="Size" Type="System.Int32">50</Property>
<Property Name="RequiredInForms" Type="System.Boolean">true</Property>
<NormalizeString FromLOB="NormalizeToNull" ToLOB="NormalizeToEmptyString" />

That didn't seem to do anything, so I put it on my ReadList, ReadItem, Updater and Creator methods also for the typedescriptor for this field.

Eventually (not sure when it started), the CompanyName field responded to the "RequiredInForms" inside SharePoint (standard external list editor form) by showing up with the red * beside the field.

Still not sure which view (ReadItem, ReadList etc) should have the RequiredInForms setting, but it seems to work.

The Size property does not work. The company name field can only contain 50 characters max. The Size property is set to 50 max and it allows 50 plus characters.

Any thoughts?
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to emit assembly: Referenced assembly 'AxInterop.MSCommLib' does not have a s sanderson Visual Basic 2008 Essentials 1 July 16th, 2009 09:20 AM
what is an assembly in .net cindy VS.NET 2002/2003 5 April 2nd, 2007 06:10 AM
Convert .NET assembly to Executable asifdahir C# 1 January 24th, 2007 09:44 AM
Converting .NET 2.0 Assembly to .Net 1.x Assembly pskaushik .NET Framework 2.0 1 November 25th, 2006 01:51 PM
Exporting .NET assembly to COM pommel Pro VB.NET 2002/2003 0 August 21st, 2004 09:54 AM

All times are GMT -4. The time now is 07:28 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.