SharePoint 2007 (BDC for CRM 4) Why does the "Check Names" button not return results yet the "Browse" button does?
- I have created a BDC for CRM 4.
In SharePoint I add an Account field to a list and when I use the "Check Names" button, I always get "No exact match was found"!
If I use the Browse button I can retrieve the data (although I can't leave the field as null and return all records and I can't seem to use a wildcard - not sure if I should expect records to be returned by clicking the search button with no search string??).
What drives the "Check Names" data? Enterprise Search is in the process of being configured so that might be the driver and explain this behaviour.- EditadoMike Walsh MVPMVP, Moderadorsábado, 12 de dezembro de 2009 9:14BDC for added in Title before CRM4. The impression was that this was a CRM question.
Respostas
- The "Check Names" button is linked to the dbo.[FilteredAccount]SpecificFinder this means it wil recognize the entity by the accountid, copy one from your database and you will see the inputbox will show the correct name with it when you click "Check Names". Easy thing to do is just changing the accoundid to name in the SpecificFinder, but something tells me the name is not so "unique" as the id........
- Sugerido como Respostavincent_1234 segunda-feira, 30 de novembro de 2009 12:22
- Editadovincent_1234 segunda-feira, 30 de novembro de 2009 12:28
- Marcado como Respostagordonjohnston segunda-feira, 30 de novembro de 2009 13:02
Todas as Respostas
- Probably because you dont have an Identifer setup?
You also need to setup a filter on your finder method. - Sorry for the length of this but here's what I've got so far and it looks to have an identifier but it is possible that the filter/finder is wrong:
I have been struggling also with getting the web parts to return data by default rather than waiting for a query value. This is why the SQL statements are a bit odd. They are a work in progress.<Entity EstimatedInstanceCount="0" Name="Account"> <Properties> <Property Name="Title" Type="System.String">name</Property> </Properties> <Identifiers> <Identifier TypeName="System.String" Name="[accountid]" /> </Identifiers> <Methods> <Method Name="Getdbo.[FilteredAccount]"> <Properties> <Property Name="RdbCommandText" Type="System.String">IF(LEN(@name) < 1) SELECT * FROM dbo.[FilteredAccount] ELSE SELECT * FROM dbo.[FilteredAccount] WHERE name like @name or new_accountabreviation like @name or cnet_accountabreviation2 like @name</Property> <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property> </Properties> <FilterDescriptors> <FilterDescriptor Type="Comparison" Name="By Name" /> </FilterDescriptors> <Parameters> <Parameter Direction="In" Name="@name"> <TypeDescriptor TypeName="System.String" AssociatedFilter="By Name" Name="name"> <Properties> <Property Name="ShowInPicker" Type="System.Boolean">true</Property> </Properties> <DefaultValues> <DefaultValue MethodInstanceName="dbo.[FilteredAccount]Finder" Type="System.String">%</DefaultValue> </DefaultValues> </TypeDescriptor> </Parameter> <Parameter Direction="Return" Name="dbo.[FilteredAccount]"> <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="dbo.[FilteredAccount]DataReader"> <TypeDescriptors> <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.[FilteredAccount]DataRecord"> <TypeDescriptors> <TypeDescriptor TypeName="System.String" IdentifierName="[accountid]" Name="accountid"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Account ID </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="accountnumber"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Account Number </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="name"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Account Name </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_line1"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Address Line 1 </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_line2"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Address Line 2 </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_line3"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Address Line 3 </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_city"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> City </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_stateorprovince"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> State or Province </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_postalcode"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Postal Code </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_country"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Country </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="emailaddress1"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Email </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="primarycontactid"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Primary Contact ID </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="primarycontactidname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Primary Contact Name </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="telephone1"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Telephone </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="businesstypecodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Business Type </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.Decimal" Name="creditlimit"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Credit Limit </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="creditonholdname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Credit on Hold </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="customersizecodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Customer Size </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="customertypecodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Customer Type </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="description"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Description </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="emailaddress2"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Email Address 2 </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="emailaddress3"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Email Address 3 </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="fax"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Fax </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="industrycodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Industry Code </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.Int32" Name="numberofemployees"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Number of Employees </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.Decimal" Name="revenue"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Revenue </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="statecodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Account State </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="statuscodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Account Status </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="tickersymbol"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Stock Ticker Symbol </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="websiteurl"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Web Site </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotbulkemailname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Bulk Email Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotbulkpostalmailname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Bulk Postal Mail Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotemailname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Email Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotfaxname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Fax Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotphonename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Phone Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotpostalmailname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Postal Mail Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotsendmarketingmaterialname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Send Marketing Materials </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="new_accountabreviation" DefaultDisplayName="Account Abreviation" /> <TypeDescriptor TypeName="System.String" Name="cnet_accountabreviation2" DefaultDisplayName="Account Abreviation 2" /> <TypeDescriptor TypeName="System.Boolean" Name="new_businessintelligence" DefaultDisplayName="Business Intelligence?" /> <TypeDescriptor TypeName="System.Boolean" Name="new_customdevemopment" DefaultDisplayName="Custom Devemopment?" /> <TypeDescriptor TypeName="System.Boolean" Name="new_crm" DefaultDisplayName="CRM?" /> <TypeDescriptor TypeName="System.Boolean" Name="new_sharepoint" DefaultDisplayName="SharePoint?" /> </TypeDescriptors> </TypeDescriptor> </TypeDescriptors> </TypeDescriptor> </Parameter> </Parameters> <MethodInstances> <MethodInstance Type="Finder" ReturnParameterName="dbo.[FilteredAccount]" ReturnTypeDescriptorName="dbo.[FilteredAccount]DataReader" ReturnTypeDescriptorLevel="0" Name="dbo.[FilteredAccount]Finder" /> </MethodInstances> </Method> <Method Name="dbo.[FilteredAccount]SpecificFinder"> <Properties> <Property Name="RdbCommandText" Type="System.String">Select * From dbo.[FilteredAccount] Where (accountid=@accountid)</Property> <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property> </Properties> <Parameters> <Parameter Direction="In" Name="@accountid"> <TypeDescriptor TypeName="System.String" IdentifierName="[accountid]" Name="[accountid]" /> </Parameter> <Parameter Direction="Return" Name="dbo.[FilteredAccount]"> <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="dbo.[FilteredAccount]DataReader"> <TypeDescriptors> <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.[FilteredAccount]DataRecord"> <TypeDescriptors> <TypeDescriptor TypeName="System.String" IdentifierName="[accountid]" Name="accountid"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Account ID </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="accountnumber"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Account Number </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="name"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Account Name </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_line1"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Address Line 1 </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_line2"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Address Line 2 </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_line3"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Address Line 3 </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_city"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> City </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_stateorprovince"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> State or Province </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_postalcode"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Postal Code </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="address1_country"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Country </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="emailaddress1"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Email Address </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="primarycontactid"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Primary Contact ID </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="primarycontactidname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Primary Contact Name </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="telephone1"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Main Telephone </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="businesstypecodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Business Type </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.Decimal" Name="creditlimit"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Credit Limit </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="creditonholdname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Credit on Hold </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="customersizecodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Customer Size </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="customertypecodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Customer Type </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="description"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Description </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="emailaddress2"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Email Address 2 </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="emailaddress3"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Email Address 3 </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="fax"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Fax </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="industrycodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Industry Code </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.Int32" Name="numberofemployees"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Number of Employees </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.Decimal" Name="revenue"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Revenue </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="statecodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Account State </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="statuscodename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Account Status </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="tickersymbol"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Stock Ticker Symbol </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="websiteurl"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Web Site </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotbulkemailname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Bulk Email Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotbulkpostalmailname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Bulk Postal Mail Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotemailname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Email Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotfaxname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Fax Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotphonename"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Phone Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotpostalmailname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Postal Mail Marketing </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="donotsendmarketingmaterialname"> <LocalizedDisplayNames> <LocalizedDisplayName LCID="1033"> Send Marketing Materials </LocalizedDisplayName> </LocalizedDisplayNames> </TypeDescriptor> <TypeDescriptor TypeName="System.String" Name="new_accountabreviation" DefaultDisplayName="Account Abreviation" /> <TypeDescriptor TypeName="System.String" Name="cnet_accountabreviation2" DefaultDisplayName="Account Abreviation 2" /> <TypeDescriptor TypeName="System.Boolean" Name="new_businessintelligence" DefaultDisplayName="Business Intelligence?" /> <TypeDescriptor TypeName="System.Boolean" Name="new_customdevemopment" DefaultDisplayName="Custom Devemopment?" /> <TypeDescriptor TypeName="System.Boolean" Name="new_crm" DefaultDisplayName="CRM?" /> <TypeDescriptor TypeName="System.Boolean" Name="new_sharepoint" DefaultDisplayName="SharePoint?" /> </TypeDescriptors> </TypeDescriptor> </TypeDescriptors> </TypeDescriptor> </Parameter> </Parameters> <MethodInstances> <MethodInstance Type="SpecificFinder" ReturnParameterName="dbo.[FilteredAccount]" ReturnTypeDescriptorName="dbo.[FilteredAccount]DataReader" ReturnTypeDescriptorLevel="0" Name="dbo.[FilteredAccount]SpecificFinder" /> </MethodInstances> </Method> <Method Name="dbo.[FilteredAccount]IDEnumerator"> <Properties> <Property Name="RdbCommandText" Type="System.String">Select [accountid] from dbo.[FilteredAccount]</Property> <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property> </Properties> <Parameters> <Parameter Direction="Return" Name="dbo.[FilteredAccount]IDs"> <TypeDescriptor TypeName="System.Data.IDataReader, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" IsCollection="true" Name="dbo.[FilteredAccount]IDs"> <TypeDescriptors> <TypeDescriptor TypeName="System.Data.IDataRecord, System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Name="dbo.[FilteredAccount]"> <TypeDescriptors> <TypeDescriptor TypeName="System.String" IdentifierName="[accountid]" Name="accountid" /> </TypeDescriptors> </TypeDescriptor> </TypeDescriptors> </TypeDescriptor> </Parameter> </Parameters> <MethodInstances> <MethodInstance Type="IdEnumerator" ReturnParameterName="dbo.[FilteredAccount]IDs" ReturnTypeDescriptorName="dbo.[FilteredAccount]IDs" ReturnTypeDescriptorLevel="0" Name="dbo.[FilteredAccount]EnumeratorInstance" /> </MethodInstances> </Method> </Methods> <Actions> <Action Position="1" IsOpenedInNewWindow="true" Url="http://XXXXX/XXXXX/sfa/accts/edit.aspx?id={0}" ImageUrl="http://crm2.company-net.com/_imgs/ico_18_4002.gif" Name="Edit Account in CRM"> <ActionParameters> <ActionParameter Index="0" Name="accountid" /> </ActionParameters> </Action> <Action Position="2" IsOpenedInNewWindow="true" Url="http://XXXXX/XXXXX/sfa/conts/edit.aspx?id={0}" ImageUrl="http://crm2.company-net.com/_imgs/ico_18_2.gif" Name="Edit Primary Contact in CRM"> <ActionParameters> <ActionParameter Index="0" Name="primarycontactid" /> </ActionParameters> </Action> <Action Position="3" IsOpenedInNewWindow="true" Url="http://XXXXX/XXXXX/sfa/accts/edit.aspx" ImageUrl="http://crm2.company-net.com/_imgs/ico_18_4002.gif" Name="Create Account in CRM" /> </Actions> </Entity>
Regards,
Gordon - Change your type on your filterdescriptor to Wildcard. You should use wildcard when dealing with LIKE operator in SQL.
- Marcado como Respostagordonjohnston quinta-feira, 15 de outubro de 2009 12:43
- Não Marcado como Respostagordonjohnston quinta-feira, 15 de outubro de 2009 12:43
- Sorry clicked the mark as answer button in error. Have not resolved the issue yet. Have changed my code (sample below):
<Entities> <Entity EstimatedInstanceCount="0" Name="Account"> <Properties> <Property Name="Title" Type="System.String">name</Property> </Properties> <Identifiers> <Identifier TypeName="System.String" Name="[accountid]" /> </Identifiers> <Methods> <Method Name="Getdbo.[FilteredAccount]"> <Properties> <Property Name="RdbCommandText" Type="System.String"><br /> IF(LEN(@name) < 1) <br /> SELECT * FROM dbo.[FilteredAccount] <br /> ELSE SELECT * FROM dbo.[FilteredAccount] <br /> WHERE name like @name <br /> or new_accountabreviation like @name <br /> or cnet_accountabreviation2 like @name</Property> <Property Name="RdbCommandType" Type="System.Data.CommandType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">Text</Property> </Properties> <FilterDescriptors> <FilterDescriptor Type="Wildcard" Name="By Name" /> </FilterDescriptors> <Parameters> <Parameter Direction="In" Name="@name"> <TypeDescriptor TypeName="System.String" AssociatedFilter="By Name" Name="name"> <Properties> <Property Name="ShowInPicker" Type="System.Boolean">true</Property> </Properties> <DefaultValues> <DefaultValue MethodInstanceName="dbo.[FilteredAccount]Finder" Type="System.String">%</DefaultValue> </DefaultValues> </TypeDescriptor> </Parameter>
Still no joy with either the "Check Names" button which returns "No exact match was found." every time. Also not getting a list returned by default when I add the list via a BDC list control.
Not sure that my SQL is correct. Was trying to anticipate an empty string but think my statement might be rubbish.
Another though is that since I am querying CRM through Filtered Views, perhpse there is a permissions issue. Maybe the the "Check Names" button runs under different credentails? Does it use Search? - Sorry, unable to format the code to show the SQL statement properly. Her it is:
IF(LEN(@name)
< 1)
SELECT * FROM dbo.[FilteredAccount]
ELSE SELECT * FROM dbo.[FilteredAccount]
WHERE name like @name
or new_accountabreviation like @name
or cnet_accountabreviation2 like @name - experiencing the same problem, too bad there isn't a solution yet
- Alas this is an internal project so I don't get much time to try all the different permutations of BDC configuration.
It would be nice to see a really good set of examples on CRM/SharePoint integration.
My next step is to abandon Kerberos and write a simplified BCD with a SQL connection and no security trimming.
Don't know when I'll get the chance to do that but it will allow me to determine whether this box uses a different route to allow search and lookup. - The "Check Names" button is linked to the dbo.[FilteredAccount]SpecificFinder this means it wil recognize the entity by the accountid, copy one from your database and you will see the inputbox will show the correct name with it when you click "Check Names". Easy thing to do is just changing the accoundid to name in the SpecificFinder, but something tells me the name is not so "unique" as the id........
- Sugerido como Respostavincent_1234 segunda-feira, 30 de novembro de 2009 12:22
- Editadovincent_1234 segunda-feira, 30 de novembro de 2009 12:28
- Marcado como Respostagordonjohnston segunda-feira, 30 de novembro de 2009 13:02
- You are bang on. I hadn't noticed that if I enter the CRM Guid for the account into the field, the lookup works and returns the name of the organization.
I had expected SpcificFinder to be there to find a specific Account based on the ID. Normally with data you have "Select All", "Select By ID" and perhaps "Select with Paging" SPROCS or Queries.
I will change the Specific Finder as you suggest. No idea if there will be side effects in other areas.
Thanks for your reply. - Maybe you could share your possible "side effects".
I am afraid the account will be stored by name in sharepoint and occur in broken links when changing names in Dynamics CRM Another question, is the statement
working for you? My picker is not showing the list with all itemsIF(LEN(@name) < 1)
The behaviour I am seeing is:
when, for example, the "Choose Account" dialog pops up, it is initialy empty. I can then enter the account name or a portion of it and I can find any of the accounts I have tested.
when using the BDC Web Parts I can't get the full list returned by default unless I add an asterisk as the default query. I would like to fix this but have been unsuccessful so far.
Regards,
Gordon- I am amending my BDC to use "name" in the Specific Finder. I am troubled that I can't see any examples that use this technique although it will solve my immediate problem.
Every example out there the "AccountId" field.
It's very much a dark art!! - Any darker, but yet less problematic is keeping the AccountID property, still compare by it's value in the sql statement, but add "OR name = @accountid"
This will give you the ability to search for names and it is still possible to search by guid (what sharepoint does I presume)
Do not forget so add the "SELECT TOP 1" because if it returns more results, it will show you the evil and clueless error page
And now my question, you say "when using the BDC Web Parts I can't get the full list returned by default unless I add an asterisk as the default query"
what do you mean?
the asterisk here:
<DefaultValues>
<DefaultValue MethodInstanceName="dbo.[FilteredAccount]Finder" Type="System.String">*</DefaultValue>
</DefaultValues>
or in the select statement? (which I do not want to use, I guess) - Only meant that when I add the Business Data List Web Part to a page, by default there are no rows in the control and that I have to clock Retrieve Data to fill the grid. I found a default value in their somewhere that you place an asterisk into that returns all by default but you see the asterisk in the filter by section at the top.
It just looked a bit messy to me. I was looking to have all records returned and provide the user with the option of filtering the list down in a slicker way.
The BDC examples I have seen seem to imply that I can return all the records if no filter value has been entered but it doesn't seem to work for me.
ALSO:
I tried using the name field in the filter as suggested above but received this:
Application definition import failed. The following error occurred: The IdentifierName Attribute of the TypeDescriptor named '[name]' of the Parameter named '@name' of the Method named 'dbo.[FilteredAccount]SpecificFinder' of the Entity named 'Account' does not match any of the defined Identifiers for the Entity. Error was encountered at or just before Line: '333' and Position: '16'.
I'll have another attempt when I have time. I probably missed something.
Regards,
Gordon