mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-19 05:03:32 +08:00
20
microsoft-sdk-soap/microsoft-sdk-soap-tests.ts
Normal file
20
microsoft-sdk-soap/microsoft-sdk-soap-tests.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
/// <reference path="microsoft-sdk-soap.d.ts" />
|
||||
|
||||
// QueryByAttribute
|
||||
var queryByAttribute = new Sdk.Query.QueryByAttribute( "account" );
|
||||
queryByAttribute.addColumn( "accountnumber" );
|
||||
queryByAttribute.addAttributeValue( new Sdk.String( "name", "acme" ) );
|
||||
Sdk.Q.retrieveMultiple( queryByAttribute ).then( entityCollection =>
|
||||
{
|
||||
var accountNumber = entityCollection.getEntity( 0 ).getAttributes( "accountnumber" ).getValue();
|
||||
console.log( "Account 'acme' has the Account Number '" + accountNumber + "'" );
|
||||
} );
|
||||
|
||||
// QueryExpression
|
||||
var queryExpression = new Sdk.Query.QueryExpression( "account" );
|
||||
queryExpression.setColumnSet( new Sdk.ColumnSet( true ) );
|
||||
queryExpression.addCondition( "account", "accountname", Sdk.Query.ConditionOperator.BeginsWith, new Sdk.Query.Strings( [ "abc", "xyz" ] ) );
|
||||
Sdk.Q.retrieveMultiple( queryExpression ).then( entityCollection =>
|
||||
{
|
||||
console.log( "Query matches " + entityCollection.getTotalRecordCount() + " records." );
|
||||
} );
|
||||
2863
microsoft-sdk-soap/microsoft-sdk-soap.d.ts
vendored
Normal file
2863
microsoft-sdk-soap/microsoft-sdk-soap.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user