jamii Archives: BDC

Haraka Tip: BDC ADF Version Hesabu Je, Rafiki yako

Kama wewe ni mkono-coding files ADF na kufanya mengi ya kanuni / kuagiza / mtihani mizunguko, use the version number to make your life easier.

I hate kukubali hilo, lakini mpaka wiki hii, I was always deleting the ADF and re-importing it. This would break my business data columns and make me re-wire them. All unnecessary.

File this under "it’s obvious once you see it".

Mfano:

<LobSystem
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Aina="Webservice" Toleo="1.2.0.0" Jina="xyzzyDocumentReview" xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">

Change that version and re-import and the existing business data column uses the updated version automatically with no additional configuration required.

</mwisho>

Kujiunga na blog yangu.

Tags technorati:

Ufumbuzi: BDC Picker Inaonyesha Mmoja tu Column ya Matokeo

In my on-going attempts at providing a more useful lookup column using BDC, I hit a wall with the BDC picker. If you haven’t see it, the BDC picker is similar to a people picker except that it works with columns of type "business data".

You access the picker by clicking on the open book icon of a business data column as shown:

picha

The above image shows a business data column called "Master Document Id". That column is connected, via BDC, to a web service. The web service returns two columns of information: Document ID and Title. The business purpose here is to provide a "this document is based on" kazi. Users select a "master" document and when they save, an event receiver copies meta data fields from the referenced master.

By default, the BDC picker looks like this when I search for a document whose ID = "38":

clip_image002

That’s helpful, but not good enough. People don’t think in terms of IDs, they think in terms of titles and/or other meta data. The picker allows you to search on other columns (e.g. Title) but won’t show the actual list of titles it found, just their DocId’s as shown here:

clip_image002[1]

(The screen shot isn’t so great because I didn’t pick a search that returns any valid results, but you can see that if it had found some results, it would only have shown DocId’s, not titles).

I searched high and low for the answer to this and failed. Yangu mwenzake, the venerable Jonathan Bradshaw, had faced and solved this issue. When I reached out to him for help, he pointed me in the right direction.

Configure the picker to show multiple columns via the "ShowInPicker" property in the ADF:

<Mali Jina="ShowInPicker" Aina="System.Boolean">kweli</Mali>

In more detail:

  <!-- Title -->
  <TypeDescriptor TypeName="System.String" Jina="Title" >
    <LocalizedDisplayNames>
      <LocalizedDisplayName LCID="1033">Title</LocalizedDisplayName>
    </LocalizedDisplayNames>
    <Mali>
      <Mali Jina="DisplayByDefault" Aina="System.Boolean">kweli</Mali>
      <Mali Jina="ShowInPicker" Aina="System.Boolean">kweli</Mali>
    </Mali>
  </TypeDescriptor>

Setting this property does introduce a minor problem. As soon as you set it once, you need to set it for every column you want to show. Katika kesi yangu, BDC picker showed DocId by default. Hata hivyo, once I added "ShowInPicker" to Title, DocId no longer displayed. I solved that by explicitly setting the ShowInPicker property for Doc ID.

Here is the result:

picha

(I’ll explain the odd-looking "168 – CamlSchema.xsd" construction in a future blog post. Kwa kifupi, it’s a concatenated string that allows for a slightly better user experience).

Bila shaka, having written this blog entry, I just did a search for "ShowInPicker" and found numerous hits, including this one: http://msdn2.microsoft.com/en-us/library/ms583986.aspx. It explains the meaning of that property along with some other good BDC stuff.

</mwisho>

Kujiunga na blog yangu!

Tags technorati:

Ufumbuzi wa Kushindwa BDC ADF Import: “makosa yafuatayo ilitokea:”

Mimi mara kwa mara nyingine tena kuandika BDC files ADF kwa mkono (so that I can build up my "get off my lawn!" Mimi) na kugonga kosa hili lovely:

picha

"Application definition import failed. makosa yafuatayo ilitokea:"

Kama unaweza kuona, kuna makosa, lakini … si kwenda kuwaambia mimi ni nini.

Katika kesi yangu, the issue turned out that I had started off with a functional ADF for a different project that connected to a database and executed a SQL query against a view. In this new project, I am calling a method on a web service. I had stripped out the DB specific stuff and added my web service stuff, but failed to update the <LobSystem>’s Type attribute. I switched it to "WebService" and I happily moved on to newer and more exciting import errors, which were handled in due course.

Here is the wrong LobSystem:

<LobSystem
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=http://schemas.microsoft.com/office/2006/03/BusinessDataCatalogBDCMetadata.xsd
Type="Database"
Version="1.0.0.0" Name="xyzzy"
xmlns="
http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">

This is correct:

<LobSystem
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=http://schemas.microsoft.com/office/2006/03/BusinessDataCatalogBDCMetadata.xsd
Type="WebService"
Version="1.0.0.0" Name="xyzzy"
xmlns="
http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">

</mwisho>

Tags technorati:

BDC Inaonekana Badala ya faida kwa ajili ya lookups

UPDATE: Hii MSDN posting ina baadhi ya uchunguzi ya kuvutia kutoka JXJ msingi wake, hasa hasi, uzoefu kwenda chini njia hii: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2623565&SiteID=1

We have a business scenario where we need to link two documents libraries via a common "document ID" shamba.

We often use a lookup column to implements links like this. There are several drawbacks to lookup columns, tatu ambayo ni:

  1. Only one column from the lookup lookup library can be linked.
  2. Utendaji: The source library could contain hundreds of entries. That’s too many entries in the lookup.
  3. Kutafuta: There is no integrated search. I don’t mean in the MOSS sense of search, lakini hakuna njia ya kutafuta / kuchuja na nguzo nyingi kutoka maktaba hati chanzo na Machapisho kiungo unataka.

Yanayoambatana na BDC, we can use a "business data" column type and it provides a superior search and even allows multiple columns of data to appear in list views.

Nimepata baadhi ya mafanikio ya awali na mbinu hii na mpango wa kuandika zaidi kuhusu hilo.

Kama umefanya kazi hii kabla ya angle na kuwa na maoni yoyote, tafadhali kushiriki!

</mwisho>

Tags technorati:

Ufumbuzi wa Hitilafu BDC Import: “Haikuweza kupakia Aina ilivyoelezwa na TypeName TypeDescriptor ya …”

Nimekuwa kazi na leo BDC, coding ADF files by hand and generating myself some errors. One such error:

Maombi ufafanuzi kuagiza wameshindwa. makosa yafuatayo ilitokea: Haikuweza kupakia Aina ilivyoelezwa na TypeName TypeDescriptor ya. Parameter jina: Hitilafu typeName lilipatikana katika au kabla tu Line: '35’ na Msimamo: ’20’.

MOSS kuonyeshwa kosa hili wakati nilijaribu kuagiza ADF XML faili.

Mimi utafiti Internets na kukuta kwamba nilikuwa referencing mfano LOB jina (kutoka <LobSystemInstance>) katika wangu <TypeDescriptor> nodi wakati mimi wanapaswa inatazamwa jina LOB yenyewe (kutoka <LobSystem>).

Vibaya:

<TypeDescriptor TypeName="Conchango.KeyValue, LOB tukio la" Name="KeyValue">

Kusahihisha:

<TypeDescriptor TypeName="Conchango.KeyValue, LOB Jina" Name="KeyValue">

Matumaini hii moja anaokoa mtu saa moja au mbili ya muda.

</mwisho>

Kujiunga na blog yangu!

Tags technorati:

BDC Runtime kosa alielezea

Mimi unasababishwa kosa BDC wiki hii kuwa wazi yenyewe juu ya interface user na katika 12 mzinga logi katika Runtime.

Kwanza, hii alionekana katika interface user:

Hakuweza kupata mashamba ya kuingiza Maadili kila kitambulisho kwa usahihi nitafanya MethodInstance SpecificFinder na Jina … Kuhakikisha kuwa pembejeo Vigezo TypeDescriptors kuhusishwa na kila Kitambulisho defined kwa Entity hii.

Hapa ni risasi screen:

clip_image001

Mimi naweza pia kusababisha ujumbe huu kuonekana katika 12 mzinga logi katika mapenzi (using my patented high-tech-don’t-try-this-at-home "mysterious errors" njia):

11/14/2007 09:24:41.27 w3wp.exe (0x080C) 0x0B8C SharePoint Portal Server Business Data 6q4x High Exception in BusinessDataWebPart.OnPreRender: System.InvalidOperationException: Thamani Kitambulisho ”, Aina ya ”, ni batili. Expected Identifier value of Type ‘System.String’. saa Microsoft.Office.Server.ApplicationRegistry.MetadataModel.Entity.FindSpecific(Kitu[] subIdentifierValues, LobSystemInstance lobSystemInstance) saa Microsoft.SharePoint.Portal.WebControls.BdcClientUtil.FindEntity(Chombo chombo, Kitu[] userValues, LobSystemInstance lobSystemInstance) saa Microsoft.SharePoint.Portal.WebControls.BusinessDataItemBuilder.GetEntityInstance(View desiredView) saa Microsoft.SharePoint.Portal.WebControls.BusinessDataDetailsWebPart.GetEntityInstance() saa Microsoft.SharePoint.Portal.WebControls.BusinessDataDetailsWebPart.SetDataSourceProperties()

I searched karibu na kupatikana inaongoza katika baadhi ya MSDN jukwaa, but they weren’t enough for me to understand what I was doing wrong. I watched a webcast by Ted Pattison kwamba yangu kampuni ina squirreled mbali juu ya server na alikuja kutambua tatizo langu.

Katika ADF yangu, Mimi kuunganisha na database SQL kama inavyoonekana:

            <Mali Jina="RdbCommandText" Aina="System.String">
              <![CDATA[
                CHAGUA
                      , CARRIER_ID, EFFDT, DESCR, EFF_STATUS, TAXPAYER_ID, NETWORK_ID, FRT_FORWARD_FLG, ALT_NAME1, ALT_NAME2, LANGUAGE_CD,
                      NCHI, ADDRESS1, ADDRESS2, ADDRESS3, ADDRESS4, CITY, NUM1, NUM2, HOUSE_TYPE, ADDR_FIELD1, ADDR_FIELD2, ADDR_FIELD3,
                      COUNTY, HALI, Postal, GEO_CODE, IN_CITY_LIMIT, COUNTRY_CODE, SIMU, UTVIDGNING, Faksi, LAST_EXP_CHK_DTTM, FREIGHT_VENDOR,
                      INTERLINK_DLL, TMS_EXCLUDE_FLG
                 (nolock)
                WAPI
                  (LEAs <> 'SHARE') na
                  (kupunguza(CARRIER_ID) >= Chini(@ MinID)) na
                  (kupunguza(CARRIER_ID) <= Chini(@ MaxId)) na
                  (kupunguza(DESCR) KAMA chini(@ InputDescr))
                ]]>
            </Mali>

Mimi nilikuwa zinazotolewa kwamba SQL kutoka mtu DBA na mimi nina aliyopewa kuelewa kwamba ni maalum view they created just for me. The unique key there is CARRIER_ID.

Hapa ni mdudu Mimi ilianzisha:

      <Vitambulisho>
        <Kutambua Jina="CARRIER_ID" TypeName="System.String" />
        <Kutambua Jina="DESCR" TypeName="System.String" /> 
</Vitambulisho>

Mahali fulani kwenye mstari, Mimi alikuwa imeweza kuwachanganya mwenyewe juu ya maana ya <Vitambulisho> and added DESCR even though it’s not actually an identifier. I took DESCR out of the identifiers set and presto! Ni wote kazi.

I hope this saves someone some grief 🙂

Tags technorati: , , ,

BDC ADF na rafiki yako, CDATA

I’ve noticed some awkward and unnecessary hand-encoding of RdbCommandText in some examples (including MSDN documentation).

I wanted to point out to newcomers to BDC that commands can be wrapped inside a CDATA tag in their "natural" form. Hivyo, this awkward construction:

<Mali Jina="RdbCommandText" Aina="System.String">
SELECT dbo.MCRS_SETTLEMENT.id, dbo.MCRS_SETTLEMENT.settlement from dbo.MCRS_SETTLEMENT
WAPI (id &gt;= @MinId) NA (id &lt;= @ MaxId)
</Mali>

can be better represented this way:

<Mali Jina="RdbCommandText" Aina="System.String">
<![CDATA[
SELECT dbo.MCRS_SETTLEMENT.id, dbo.MCRS_SETTLEMENT.settlement from dbo.MCRS_SETTLEMENT
WAPI (id >= @MinId) NA (id <= @MaxId)
]]>
</Mali>

</mwisho>

BDC Primer

Intro to BDC

Mfano kazi: BDC ADF kwamba unajumuisha na database SQL na id iliyoingia mtumiaji na nywila

I needed to wire up MOSS to a SQL database via BDC. For testing/POC purposes, I wanted to embed the SQL account user id and password in the ADF. Starting with hii template (http://msdn2.microsoft.com/en-us/library/ms564221.aspx), Mimi umba ADF kwamba unajumuisha na hasa mfano SQL server na magogo katika na id maalum mtumiaji na nywila na inavyoonekana katika snippet hii:

  <LobSystemInstances>
    <LobSystemInstance Jina="ClaimsInstance">
      <Mali>
        <Mali Jina="AuthenticationMode" Aina="System.String">PassThrough</Mali>
        <Mali Jina="DatabaseAccessProvider" Aina="System.String">SqlServer</Mali>
        <Mali Jina="RdbConnection Takwimu Chanzo" Aina="System.String">server halisi  halisi mfano</Mali>
        <Mali Jina="RdbConnection Awali Catalog" Aina="System.String">halisi ya awali catalog</Mali>
        <Mali Jina="RdbConnection Integrated Usalama" Aina="System.String">SSPI</Mali>
        <Mali Jina="RdbConnection kuunganisha" Aina="System.String">uongo</Mali>

        <!-- Haya ni maadili muhimu: -->
        <Mali Jina="RdbConnection User ID" Aina="System.String">actual User ID</Mali>
        <Mali Jina="RdbConnection Siri" Aina="System.String">halisi cha Siri</Mali>
        <Mali Jina="RdbConnection Trusted_Connection" Aina="System.String">uongo</Mali>

      </Mali>
    </LobSystemInstance>
  </LobSystemInstances>

Si njia bora, but it’s useful for a quick and simple configuration for testing. This was surprisingly difficult to figure out. I never found a functional example with search keywords:

  • ADF iliyoingia userid na password
  • embed user id na password katika ADF
  • embed user id na password katika ADF BDC
  • SharePoint BDC primer
  • SharePoint kupachika user id na password katika ADF

</mwisho>

Kujiunga na blog yangu.