Sladescross's Blog

Blogging about Sharepoint related stuff

Taxonomy Field Update Through Lists.asmx January 26, 2012

Filed under: Lists.asmx,TaxonomyField Update Through Lists.asmx — sladescross @ 5:20 pm

http://blogs.msdn.com/b/sridhara/archive/2010/07/09/update-taxonomy-field-values-in-a-list-item-through-sharepoint-web-services.aspx

At microsoft’s recomendations we changed the code to update BOTH the fields for an MMS field as shown below :-

batchElement.InnerXml = “<Method ID=’1′ Cmd=’Update’>”

+ “<Field Name=’ID’>3</Field>”

+ “<Field Name=’Title’>Modified through lists.asmx web service 1</Field>”

+ “<Field Name=’Country’>3;#Germany</Field>”

+ “<Field Name=’Continent’>2</Field>”

+ “<Field Name=’ContinentTaxHTField0′>0;#Northamerica|d511f3c7-377f-480f-aff6-beebecd3c675</Field>”

+ “</Method>”;

I also found that the pointer “<Field Name=’Continent’>2</Field>” could be set to 0 if the term was not already in the hidden list. ie “<Field Name=’Continent’>0</Field>”

 

 

SQL Server Agent January 25, 2012

Filed under: SQL Server Agent — sladescross @ 10:41 pm

http://www.sqlservercentral.com/articles/Stairway+Series/72461/

SQL Server Agent and proxy accounts.

Conspicuous by its absence is the Transact-SQL script (T-SQL) subsystem. T-SQL jobsteps always run in the security context of the job owner, and there’s no override in SSMS to change that. You can manually configure the job step, using the sp_add_jobstep system stored procedure, passing the database_user_name parameter to impersonate a database user for a jobstep, but of course you’ll need security rights to impersonate a database user to do so.

In order for a proxy account to work correctly, the account must have the “Log on as a batch job” (seBatchLogonRight) assigned to it by a Windows administrator (for example, in the Local Security Policy MMC snap-in, under Local Policies -> User Rights Assignment). Without that privilege the SQL Server Agent service will not be able to impersonate the account to run the job step. Also it is important to note that proxy accounts do not automatically have access to your SQL Server. If, for example, you want to use a CmdExec or PowerShell job step to log back in to SQL Server, the proxy account must explicitly be granted a login back to your SQL Server (or otherwise inherit access from a Windows group, etc.).

 

BCS Create Profile Page January 24, 2012

Filed under: BCS Profile Page — sladescross @ 5:51 pm

http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/04/15/how-to-create-a-bcs-profile-page-in-sharepoint-2010.aspx

http://blogs.msdn.com/b/uksharepoint/archive/2009/12/18/configuring-business-connectivity-services-bcs-search-in-sharepoint-2010.aspx

 

BCS Infopath January 24, 2012

Filed under: BCS Infopath — sladescross @ 5:48 pm

http://blogs.msdn.com/b/sharepointdev/archive/2011/07/22/rapid-application-development-using-infopath-and-bcs-part-1-anweshi-deverasetty.aspx

http://blogs.msdn.com/b/sharepointdev/archive/2011/07/26/rapid-application-development-using-infopath-and-bcs-part-2-anweshi-deverasetty.aspx

http://blogs.msdn.com/b/sharepointdev/archive/2011/07/28/rapid-application-development-using-infopath-and-bcs-part-3-anweshi-deverasetty.aspx

 

BCS Develop the Model in XML and SharePoint Designer January 24, 2012

Filed under: BCS Build XML — sladescross @ 5:22 pm

http://msdn.microsoft.com/en-us/library/ee819925.aspx

Create the XML for a BDC model.

http://msdn.microsoft.com/en-us/library/ee559278.aspx

BDC XML snippets to use when editing a file.

http://msdn.microsoft.com/en-us/library/gg607166.aspx#AdvancedAssociationsInBCS_ImplicitForeignKey

ALTER AdventureWorks database and edit the Exported XML for the model to create an association without a declarative FK.

http://msdn.microsoft.com/en-us/library/ee558413(office.14).aspx

Business Connectivity Services Schema Reference

 

Deploy BCS Created In SharePoint Designer January 24, 2012

Filed under: Uncategorized — sladescross @ 5:14 pm

http://dotnetmafia.sys-con.com/node/1299753/mobile

Save as Template and then edit to obtain a feature.

 

SQL Server 2008 AdventureWorks DW and BDC January 24, 2012

Filed under: AdventureWorks — sladescross @ 3:12 pm

http://techpunch.wordpress.com/2008/08/29/sql-server-2008-adventureworks-dw-bdc-demo/

1. Install the AdventureWorks Sample DW BI Database

First, you need to install the AdventureWorks Sample DW BI database.  You can download it from CodePlex.

I downloaded the full version for 2008 with the msi installer, which is nice because it installs the database and attaches it for you. Running the installation is pretty straight-forward, but if you have any trouble, you can refer to an earlier post on my blog here.

2. Install the Office SharePoint Server 2007 SDK (1.3)

Download and install the Office SharePoint Server 2007 SDK.  I’m working against the 1.3 version of the SDK.  The SDK contains a BDC application definition that were created for the SQL Server 2005 AdventureWorksDW  database.

NOTE can download the SharePointPlatformSDK.exe for 2010.

 

 

 

BCS Security January 24, 2012

Filed under: BCS,BCS Security,Security — sladescross @ 1:25 pm

http://blogs.msdn.com/b/bcs/archive/2009/11/24/permissions-in-business-connectivity-services.aspx

Chart of objects and permissions and effect of permission.

http://msdn.microsoft.com/en-us/library/ie/hh144965.aspx

MSDN on permissions.

Use the external system in SharePoint Designer 2010 Edit The external system
 

PowerPivot January 23, 2012

Filed under: PowerPivot — sladescross @ 12:31 pm

http://social.technet.microsoft.com/wiki/contents/articles/714.aspx#Hardware_Requirements

Install client addin.

http://msdn.microsoft.com/en-us/library/ee210708.aspx

PowerPivot for SharePoint.

 

Build Time Dimension January 23, 2012

Filed under: Build,Time Dimension — sladescross @ 11:30 am

http://social.msdn.microsoft.com/Forums/en-US/sqlanalysisservices/thread/ae837cbc-90c5-4c79-8de4-f807441b74ce/

Create a store procedure in your DW database (datawarehouse).

Code Snippet

CREATE

PROCEDURE [dbo].[usp_Create_dim_Date_Table]

(

@StartDate smalldatetime = ’20080101′,

@EndDate smalldatetime = ’20081231′

)

AS

BEGIN

SET NOCOUNT ON;

IF

EXISTS(SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N’[dbo].[dim_Date]‘) AND type in(N’U’))

DROP

TABLE [dbo].[dim_Date]

CREATE

TABLE dbo.dim_Date(

[MonthKey] [int] NOT NULL,

[MonthName] [nvarchar](15) NOT NULL,

[YearKey] [smallint] NOT NULL,

[YearName] [nvarchar](4) NOT NULL,

[MonthOfYearKey] [tinyint] NOT NULL,

[MonthOfYearName] [nvarchar](15) NOT NULL,

CONSTRAINT [PK_dim_Date] PRIMARY KEY CLUSTERED

(

[MonthKey] ASC

)

)

set

language English – or any other

set

datefirst 1 – 7 for Sunday, 1 for Monday

set

dateformat dmy – set differently if necessary

declare

@CurrentDate smalldatetime

declare

@TimeID as int

set

@CurrentDate = @StartDate

set

@TimeID = 1

while

( @CurrentDate <= @EndDate )

begin

insert into [dbo].[dim_Date]

(

[MonthKey] ,

[MonthName] ,

[YearKey] ,

[YearName] ,

[MonthOfYearKey] ,

[MonthOfYearName]

)

values

(

– month

datepart(year, @CurrentDate ) * 100 + datepart(month, @CurrentDate ),

convert(varchar(4), datepart(year, @CurrentDate )) + ‘ ‘ +

‘M ‘ + convert(char(2), datepart(month, @CurrentDate )),

– year

datepart(year, @CurrentDate ),

convert(varchar(4), datepart(year, @CurrentDate )),

– month of year

datepart(month, @CurrentDate ),

datename(month, @CurrentDate )

)

set @TimeID = @TimeID + 1

set @CurrentDate = dateadd( month, 1, @CurrentDate )

end

END

Tweak some options (see comments).

Execute it with your parameters (span of dates that your data lies between or greater. Or, put two dates for span directly into stored procedure as parameters’ defaults in case you prefer that way (I made defaults for year 2008).

 

 
Follow

Get every new post delivered to your Inbox.