Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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">
<Properties>
<Property Name="Size" Type="System.Int32">50</Property>
<Property Name="RequiredInForms" Type="System.Boolean">true</Property>
</Properties>
<Interpretation>
<NormalizeString FromLOB="NormalizeToNull" ToLOB="NormalizeToEmptyString" />
</Interpretation>
</TypeDescriptor>

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?




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





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