Quantcast
Viewing all articles
Browse latest Browse all 32807

Visual Studio SDK - Search a table

HI,

I'm using the VS SDK, and cant work out how to search a table for a record.

As an example, I'm trying to get all the records in the Duos (SY90000) table that have the ObjectType='X' and the PropertyName='Y' regardless of whats in the other fields, in sql this would be:

"Select * from sy90000 where ObjectType='X' and PropertyName='Y'

Using the SDK i've got the following:

var duosTable = Dynamics.Tables.SyUserObjectStore;

duosTable.Key = 1;

duosTable.Clear();

duosTable.ObjectType.Value = "X";

duosTable.PropertyName.Value = "Y";                                

duosTable.RangeStart();

duosTable.Fill();

duosTable.ObjectType.Value = "X";

duosTable.PropertyName.Value = "Y";

duosTable.RangeEnd();

But this is returning all the records that have an ObjectType value of X, regardless of whats in the other fields.

Is what I'm after possable, and if so could someone point me in the right direction? I'm trying not to use sql to directly access the tables.

Thanks

Tim


Viewing all articles
Browse latest Browse all 32807

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>