Adding Vendor lookup to custom field - acumatica

I added a custom field for vendorid on the SO Line. (Yes, I know there is one there, but we are building some new logic). I've added the integer field and it appears on the grid fine. I'm trying to get a lookup of vendors. I started with this
Where<AP.Vendor.type, NotEqual<BAccountType.employeeType>>>))]
and then tried
Where<BAccountR.type, Equal<BAccountType.companyType>,
Or<AP.Vendor.type, NotEqual<BAccountType.employeeType>>>>),
Visibility = PXUIVisibility.SelectorVisible, CacheGlobal = true, Filterable = true)]
It got me a lookup on new records, but then when I save and try to open any sales order, I get an error that says "Error: An error occurred during the processing of the field InventoryID: Specified cast is not valid.." which makes no sense to me. But if I remove the above it works, so seems like that must be the issue.
Stack Trace as requested:
Error: Error: An error occurred during processing of the field InventoryID: Specified cast is not valid..
Raised At: 2/24/2020 6:47:58 PM Screen: SO.30.10.00
Details:
2/24/2020 6:47:58 PM Error:
Error: An error occurred during processing of the field InventoryID: Specified cast is not valid..
System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at PX.Data.PXDataRecord.GetInt32(Int32 i)
at PX.Data.PXDBIntAttribute.RowSelecting(PXCache sender, PXRowSelectingEventArgs e)
at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly)
at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly)
at PX.Data.PXCache`1.Select(PXDataRecord record, Int32& position, Boolean isReadOnly, Boolean& wasUpdated)
at PX.Data.PXView.GetResult(Object[] parameters, PXFilterRow[] filters, Boolean reverseOrder, Int32 topCount, PXSearchColumn[] sorts, Boolean& overrideSort, Boolean& extFilter)
at PX.Data.PXView.Select(Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Objects.SO.SOOrderEntry.transactions()
at _CustomMethod(Object , Object[] )
at PX.Data.PXView.InvokeDelegate(Object[] parameters)
at PX.Data.PXView.Select(Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Data.PXGraph.ExecuteSelect(String viewName, Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
Anyone have any thoughts?

TL;DR;
Remove PXDBInt attribute from the field.
The issue here is not with Where condition but with attributes definition for the field.
[PXDBInt]
[PXUIField(DisplayName="Vendor ID")]
[AP.Vendor(typeof(Search<BAccountR.bAccountID, Where<AP.Vendor.type,
NotEqual<BAccountType.employeeType>>>))]
Actually, here you have DBField attribute twice. You have PXDBIntAttribute and Vendor attribute that contains PXDBIntAttribute inside.
Because of that the framework has the wrong fields to db columns mapping resulting in that strange error.
If you use Visual studio, I recommend you to try Acuminator extension https://marketplace.visualstudio.com/items?itemName=Acumatica.Acuminator
It highlights that type of errors

Too long for a comment, but more of a suggestion than an "answer". Try building your own PXSelector. I have a custom DAC that needs to store two vendors, and I had to abandon the AP.Vendor attribute for a custom PXSelector for mine to work. This is one of mine. In my case, I need to be able to see which one is defined as the Preferred Vendor for the warehouse, and I only want to see vendors associated with my InventoryID. SSINItemBranch is a custom DAC that is also available in the scope of this DAC's usage. The point is, use this as an example if you need one to try creating your own from scratch. If this isn't how you want to accomplish the task, at least you might isolate if the problem is a use case of the AP.Vendor attribute or something else.
[PXSelector(
typeof(Search2<
Vendor.bAccountID,
InnerJoin<POVendorInventory,
On<POVendorInventory.vendorID, Equal<Vendor.bAccountID>,
And<POVendorInventory.inventoryID, Equal<Current<SSINItemBranch.inventoryID>>>>,
LeftJoin<INItemSite, On<INItemSite.inventoryID, Equal<POVendorInventory.inventoryID>,
And<INItemSite.preferredVendorID, Equal<POVendorInventory.vendorID>,
And<INItemSite.preferredVendorLocationID, Equal<POVendorInventory.vendorLocationID>,
And<INItemSite.preferredVendorOverride, Equal<True>>>>>>>,
Where<Vendor.type, Equal<BAccountType.vendorType>>>),
typeof(Vendor.acctCD),
typeof(Vendor.acctName),
typeof(POVendorInventory.vendorLocationID),
typeof(INItemSite.preferredVendorOverride),
typeof(POVendorInventory.vendorInventoryID),
typeof(POVendorInventory.vLeadTime),
SubstituteKey = typeof(Vendor.acctCD),
DescriptionField = typeof(Vendor.acctName),
Filterable = true
)]

Related

SharePoint 2019 RSI text lenght limit error

on my SharePoint 2019 farm a had problem with RSI(Recently Shared Items). When upload or create any file with long filename and share it to other employee, it does not appear in the list for these employees. Files with short name all ok.
Some debugging:
w3wp.exe (0x04F4) 0x1898 SharePoint Foundation General boj18 Medium CITPList::SetValue failed with hr 0x81020018 for fieldid {31DE87B8-15D7-44EB-B43B-CD9BAD34CA40} 473263a0-d78c-0027-d85c-2a6886aea219
w3wp.exe (0x04F4) 0x1898 SharePoint Foundation General 8kh7 High Invalid text value. The text field contains invalid data. Check the field value and try again. 473263a0-d78c-0027-d85c-2a6886aea219
w3wp.exe (0x04F4) 0x1898 SharePoint Foundation Document Sharing awfk0 Unexpected Failed to cache recently shared item 'Documents/hiden long name file.pdf': Microsoft.SharePoint.SPException: Invalid text value. The text field contains invalid data. Check the field value and try again. ---> System.Runtime.InteropServices.COMException: Invalid text value. The text field contains invalid data. Check the field value and try again. in Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Boolean bNoDemote, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bUnRestrictedUpdateInProgress, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) в Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Boolean bNoDemote, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bUnRestrictedUpdateInProgress, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)
Field id 31de87b8-15d7-44eb-b43b-cd9bad34ca40 is a Server Redirected Url they have MaxLength : 255. I think this is a problem, but currently i don't know what to do next and how to fix it
I tried find this field in ui, but nothing found

Empty 'Invoice Date' error on Checks and Payments

I am getting error when trying to save Checks and Payments record.
The process is when I click on 'Pay Bill/Apply Adjustments' (AP301000) under 'Actions', I am redirected to the Checks and Payments (AP302000) screen. And when I try to save the record, I get the below stack trace.
Error: Inserting 'Payment' record raised at least one error. Please review the errors.
Error: 'Invoice Date' cannot be empty.
at PX.Data.PXUIFieldAttribute.CommandPreparing(PXCache sender, PXCommandPreparingEventArgs e) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Attribute.cs:line 3684
at PX.Data.PXCache.OnCommandPreparing(String name, Object row, Object value, PXDBOperation operation, Type table, FieldDescription& description) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Cache\ModelEventHandling.cs:line 146
at PX.Data.PXTableAttribute.PrepareParametersForInsert(PXCache sender, Object row, Type[] tables, ISqlDialect dialect, Boolean audit, List`1[] pars) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Attributebase.cs:line 1123
at PX.Data.PXTableAttribute.PersistInserted(PXCache sender, Object row) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Attributebase.cs:line 990
at PX.Data.PXCache`1.PersistInserted(Object row, Boolean bypassInterceptor) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Cache\Model.cs:line 6550
at PX.Data.PXCache`1.Persist(PXDBOperation operation) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Cache\Model.cs:line 6090
at PX.Data.PXGraph.Persist(Type cacheType, PXDBOperation operation) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Graph\Graph.cs:line 4402
at PX.Data.PXGraph.Persist() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Graph\Graph.cs:line 4322
at PX.Objects.AP.APPaymentEntry.Persist() in C:\Bld\AC-FULL2019R18-JOB1\Sources\WebSites\Pure\PX.Objects\AP\APPaymentEntry.cs:line 1468
at PX.Data.PXSave`1.d__2.MoveNext() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Action\CommonActions.cs:line 73
at PX.Data.PXAction`1.d__32.MoveNext() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Action\PXAction.cs:line 954
at PX.Data.PXAction`1.d__32.MoveNext() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Action\PXAction.cs:line 896
at PX.Web.UI.PXBaseDataSource.tryExecutePendingCommand(String viewName, String[] sortcolumns, Boolean[] descendings, Object[] searches, Object[] parameters, PXFilterRow[] filters, DataSourceSelectArguments arguments, Boolean& closeWindowRequired, Int32& adapterStartRow, Int32& adapterTotalRows) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Web.UI\Controls\Data\DataSource.cs:line 2592
at PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Web.UI\Controls\Data\DataSource.cs:line 1983
The coincidence is I have the customization that has a custom field the Display Text 'Invoice Date'. So, the first thing I did was I put the PersistingCheck to nothing in PXDefault attribute.
[PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
But that still didn't solve the problem.
So, I unpublish the customization and the issue was still there. Then finally I even removed the custom field (NB: The field is nullable) from database to make sure that my customization isn't causing the issue. But that also didn't work.
Upon trying to find DAC fields with the particular display text I find some fields but that doesn't seem to be associated with the graph for those screens.
Thank you.
It looks strange, I don't see any related fields with "Invoice Date" display name, which may cause an issue. I faced similar strange issues due to IIS data caching.
I would recommend do the following:
Restart IIS
Remove temp ASP.NET files which are located somewhere here C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
Remove temp Customization files
Then to be sure the problem is not in your customization
Rename your custom field from "Invoice Date" to "Invoice Date 1" for example
Publish your customization again
Try your steps again and verify an error message if it still exists - which display name do you see, "Invoice Date" or "Invoice Date 1"?

SharePoint 2010 document library upload fails for particular user - doc already exists with same name

I have a SharePoint 2010 document library in a publishing site (with workflow - standard approval) that does not have any custom code running in it. It is just configured with OOTB features - Metadata Service tagging, versioning (no checkout required, uploading to add as new versions for existing files, adds each version as a new major version), SharePoint Search etc. Only thing not OOTB is setting up of a PDF iFilter as the library stores PDFs.
Other users can upload new versions of documents with no issues, but one user (who has approver rights across the site collection) cannot. Each time he tries to upload a newer version of a document to the library he gets an error message:
The specified name is already in use. The document or folder name was not changed. To change the name to a different value, close this dialog and edit the properties of the document or folder.
Checking the SP log files with the correlation ID does not really show much, beyond this exception:
System.Runtime.InteropServices.COMException: The specified name is already in use. The document or folder name was not changed. To change the name to a different value, close this dialog and edit the properties of the document or folder.
at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)
at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)

EzApi Issue with Excel Connection Manager

EzApi is used to create SSIS package, package reads excel file through oledb connection manager(microsoft.ace.oledb.12.0) When i create EzExecSQLTask object after dataflow that reads the excel file,
i got the exception : object does not match the target type
After Debugging the EzApi code i found below line is generating the exception
host.Properties["TimeOut"].SetValue(host, value);
it seemed that when the property is set through reflection it doesn't find the target object.
Code works fine on widows xp machine , but on windows Server 2012 its causing the issue.
stack trace
at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)
at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
at Microsoft.SqlServer.Dts.Runtime.ManagedHelper.ManagedPropertyHelper.SetPropertyValue(Object o, Int32 index, Object value)
at Microsoft.SqlServer.Dts.Runtime.DtsProperty.SetValue(Object o, Object value)
at Microsoft.SqlServer.SSIS.EzAPI.EzExecSqlTask.set_TimeOut(UInt32 value) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\EzExecutables.cs:line 751
at Microsoft.SqlServer.SSIS.EzAPI.EzExecSqlTask.InitializeTask() in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\EzExecutables.cs:line 740
at Microsoft.SqlServer.SSIS.EzAPI.EzExecSqlTask..ctor(EzContainer parent) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\EzExecutables.cs:line 732
at Microsoft.SqlServer.SSIS.EzAPI.Common.ComponentWrapper.CreateSQLTaskWithExpression(EzContainer p, String name, String sql, EzConnectionManager cm) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\Common\ComponentWrapper.cs:line 55
at Microsoft.SqlServer.SSIS.EzAPI.SSI_Wrapper.SSIPackage.LogMessage(String stepID, String stepName, String userID, String statusID, String message, String sqlTaskName, EzExecutable attachToComp, EzConnectionManager cm) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\SSI Wrapper\SSIPackage.cs:line 723
at Microsoft.SqlServer.SSIS.EzAPI.SSI_Wrapper.SSIPackage.CreatePackage(Int64 userID, Nullable`1 sourceID, Int64 taskID, Boolean isSystemTask, StepDTO step, List`1 execStatus) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.EzApi\SSI Wrapper\SSIPackage.cs:line 178
at Optime.ISS.ETL.WebAPI.SSISPackageController.ExecuteTask(TaskDTO task) in d:\ROI_ETL\ROi\ETL\Optime.ISS.ETL.WebAPI\SSISPackageController.cs:line 77
More Information
Issue occured only on windows server 2012 when microsoft.ace.oledb.12.0 is used to connect to excel file. Same code works fine in window xp with microsoft.ace.oledb.12.0 32 bit drivers
please help.... we can move any further.
please suggest right forum.

Linq to nhibernate - find values starting with number

I'm using Linq to NHibernate and I have a need to find all records with a column ("BusinessName") that start with a number.
My first thought was something like this:
var numbers = Enumerable.Range(0, 10).Select(x => x.ToString()).ToList();
query = query.Where(x=>numbers.Contains(x.BusinessName.Substring(0,1)));
But I'm getting the exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetEntityName(ICriteria subcriteria, String propertyName)
at NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetType(ICriteria subcriteria, String propertyName)
at NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetTypeUsingProjection(ICriteria subcriteria, String propertyName)
at NHibernate.Criterion.InExpression.AssertPropertyIsNotCollection(ICriteriaQuery criteriaQuery, ICriteria criteria)
at NHibernate.Criterion.InExpression.ToSqlString(ICriteria criteria, ICriteriaQuery criteriaQuery, IDictionary`2 enabledFilters)
at NHibernate.Loader.Criteria.CriteriaQueryTranslator.GetWhereCondition(IDictionary`2 enabledFilters)
at NHibernate.Loader.Criteria.CriteriaJoinWalker..ctor(IOuterJoinLoadable persister, CriteriaQueryTranslator translator, ISessionFactoryImplementor factory, ICriteria criteria, String rootEntityName, IDictionary`2 enabledFilters)
at NHibernate.Loader.Criteria.CriteriaLoader..ctor(IOuterJoinLoadable persister, ISessionFactoryImplementor factory, CriteriaImpl rootCriteria, String rootEntityName, IDictionary`2 enabledFilters)
at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results)
at NHibernate.Impl.CriteriaImpl.List(IList results)
at NHibernate.Impl.CriteriaImpl.List()
at NHibernate.Impl.CriteriaImpl.UniqueResult()
at NHibernate.Linq.Visitors.ImmediateResultsVisitor`1.HandleAggregateCall(MethodCallExpression call)
at NHibernate.Linq.Visitors.ImmediateResultsVisitor`1.VisitMethodCall(MethodCallExpression call)
at NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp)
at NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression exp)
at NHibernate.Linq.Visitors.ImmediateResultsVisitor`1.GetResults(MethodCallExpression expr)
at NHibernate.Linq.Visitors.RootVisitor.HandleImmediateResultsCall(MethodCallExpression call)
at NHibernate.Linq.Visitors.RootVisitor.VisitMethodCall(MethodCallExpression expr)
at NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp)
at NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression exp)
at NHibernate.Linq.Visitors.NHibernateQueryTranslator.TranslateInternal(Expression expression)
at NHibernate.Linq.Visitors.NHibernateQueryTranslator.Translate(Expression expression, QueryOptions queryOptions)
at NHibernate.Linq.NHibernateQueryProvider.TranslateExpression(Expression expression)
at NHibernate.Linq.NHibernateQueryProvider.Execute(Expression expression)
at NHibernate.Linq.QueryProvider.System.Linq.IQueryProvider.Execute[T](Expression expression)
at System.Linq.Queryable.Count[TSource](IQueryable`1 source)
at SBON.ApiWrapper.SearchBusinesses(Nullable`1 id, String filter, String type, String letter, Nullable`1 start, Nullable`1 count) in D:\Data\Projects\Active\Clients\OfficeDepotSBON\src\SBON\ApiWrapper.cs:line 313
at SBONWeb.Controllers.MobileController.SearchBusinesses(String letter, String filter, Nullable`1 start, Nullable`1 count) in D:\Data\Projects\Active\Clients\OfficeDepotSBON\src\SBONWeb\Controllers\MobileController.cs:line 38
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
I don't really understand the exception, but I assume it has something to do with my use of substring to try match the first character against a list of numbers, since I can do the following without issue:
var numbers = Enumerable.Range(0, 10).Select(x => x.ToString()).ToList();
query = query.Where(x=>numbers.Contains(x.BusinessName));
How would you do this? Optimally I'm looking for a LINQ query that will work, but I might be able to resort to using an NHibernate named query (stored proc) if that's the only way to do this.
Bump for the Monday crowd.
This should do the trick
query = query.Where(x => char.IsNumber(x.BusinessName[0]));

Resources