|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Technique * j* a0 e6 {2 @: w' }; c
Create an Item Object but use the Item.loadAML() method to populate the Item. 8 m. t4 E6 ~" E0 X% e
4 y& R N$ Q0 M, z+ }: {
1 _) e, V( E3 [% Z. ?JavaScript
. B" k+ K/ }' o5 x' [' [ ]var innovator = new Innovator();
7 b i: M- q% ~. z' b1 P$ Ovar qryItem = innovator.newItem();
1 g) g( Y6 G% J3 JqryItem.loadAML( ' h% k# h# V7 U7 z) r4 e& j
"<Item type='Part' action='get' select='item_number,description,cost'>" + - W; q$ R0 T2 h1 M) M% }/ h
"<item_number condition='like'>1%</item_number>" + : r/ [. F: M. P3 t& C
"<Relationships>" +
- d( r, l/ J" p' r. t" A "<Item type='Part BOM' action='get' select='quantity'>" + ; F/ H" c' m2 ^5 L
"<quantity condition='gt'>1</quantity>" +
! ?9 A- ~7 b: C& V! R "</Item>" + / R4 Z/ t4 Y! L' ~+ r3 A( c E
"</Relationships>" +
6 t. ^" d o1 J# D d, z "</Item>"
7 A" l! C8 f% ]4 d# z); 2 G" l5 Y O" t* m0 |2 ?
1 P$ n* _$ u* p$ L
var resultItem = qryItem.apply(); 0 I0 q- @% M2 p6 O; n9 \
if (resultItem.isError()) {
% a! D) ^$ o/ }3 q. D e6 d1 B- Q top.aras.AlertError("Item not found: " + resultItem.getErrorDetail());
2 C3 O- g: k. `& Y+ J6 M% T return; 6 j0 s" G& |0 }8 W6 O
} 1 T2 ?0 ?4 N7 a+ J' V2 r- B9 ^+ z+ Y
+ | ~' T1 v2 B/ n: V
var count = resultItem.getItemCount(); 3 w5 \: [: @' q' D
for (i=0; i<count; ++i) {
3 A `$ ~1 `3 n var item = resultItem.getItemByIndex(i);
: @% d7 ]# g- H6 |6 x}
( H2 ]4 g% B+ H+ [( u, J' A: s/ M; D4 f. D4 i- j$ N+ \
|
|