Aras Innovator API (Innovator Object Model; IOM) provides simple way to build and submit query request with AML. This article will introduce some common methods.
Get Innovator Instance
No matter develop server side or client side code, IOM provides same members to call. The only difference is the way to get Innovator instance. Syntax of VB .NET and JavaScript show as below:VB. NET
Dim objInno As Innovator = Me.getInnovator()
JavaScript
var inno = aras.IomInnovator;
※Due to the syntax of IOM in VB .NET and JavaScript are similar, the following examples will only enumerate with JavaScript.Create Item
Mainly use the method "newItem".Syntax
var itm = inno.newItem('Part', 'get');
Built AML
<Item isNew="1" isTemp="1" type="Part" action="get"/>
Handle Attribute
Related methods are "setAttribute" and "getAttribute".Set Syntax
itm.setAttribute('select', 'id');
Built AML Node
<Item isNew="1" isTemp="1" type="Part" action="get" select="id"/>
Get Syntax
var select = itm.getAttribute('select', '');
//id
Handle Property
Related methods are "setProperty" and "getProperty".Set Syntax
itm.setProperty('item_number','A*');
Built AML Node
<Item isNew="1" isTemp="1" type="Part" action="get" select="id">
<item_number>A*</item_number>
</Item>
Get Syntax
var itemNumber = itm.getProperty('item_number', '');
//A*
Handle Property Attribute
Related methods are "setPropertyAttribute" and "getPropertyAttribute".Set Syntax
itm.setPropertyAttribute('item_number','condition','like');
Built AML Node
<Item isNew="1" isTemp="1" type="Part" action="get" select="id">
<item_number condition="like">A*</item_number>
</Item>
Get Syntax
var condition = itm.getPropertyAttribute('item_number', 'condition', '');
//like
Comments
Post a Comment