Pergunta

I have a ERP system which is linked to SharePoint via BCS. In a previous 2007 site, the BDC layer used the searchcode from the ERP system as primary key. That meant the user could just type in a searchcode in the textbox; hit the resolve button and then the matching customer would be automatically selected.

Now in the new situation in SharePoint 2010, BCS isn't using the search code any more because that code wasn't truely unique which caused problems. So now we're using the true primary key, which is an integer, but users don't know that code by heart. So instead of typing in the code and hitting resolve, they now need to open up the BCS picker, select the searchcode filter, type the name, hit search, select an entity.

Much more steps to get to the same end result, and my users aren't pleased with that. So I'm looking for ways to optimize this, without having to go back to using the searchcode as PK again. Can I, for instance, provide a default selection for the BCS filter, so it's default set to 'searchcode'?

Foi útil?

Solução

The answer is adding the following code to your model:

<FilterDescriptors>
  <FilterDescriptor Type="Wildcard" FilterField="Name" Name="Product Name" >
    <Properties>
      <Property Name="IsDefault" Type="System.Boolean">true</Property>
      <Property Name="UsedForDisambiguation" Type="System.Boolean">true</Property>
    </Properties>
  </FilterDescriptor>
</FilterDescriptors>

Outras dicas

If doing this in sharepoint designer:

  • Open site
  • Navigation -> Site Objects -> External Content Types
  • Choose your content type
  • Under External Content Type operations, choose "Read List"
  • Next (to Filter Parameters)
  • Add Filter parameter
  • Data Source Element = "your search field"
  • Filter - (Click to Add)
  • Given the filter a name (say Search Code)
  • Filter Type = Wildcard
  • Filter Field = "your search field"
  • Check "Use to create match list in external item picker"
  • Then save

This will allow you to type the search code directly into the external data field, and it should allow wildcard searchs (similar to a user field)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top