Erp100论坛's Archiver

jarden.cheung 发表于 2008-7-30 18:08

Use peoplecode call CI to import data.

following is my code.
&ciJOB = &session.GetCompIntfc(CompIntfc.SHEC_CI_JOB_DATA);

&ciJOB.InteractiveMode = True;
&ciJOB.GetHistoryItems = True;
&ciJOB.EditHistoryItems = True;

&ciJOB.KEYPROP_EMPLID = &staDataItems [1];
&log.WriteLine("KEYPROP_EMPLID = " | &ciJOB.GetPropertyByName("KEYPROP_EMPLID"));

&ciJOB.KEYPROP_EMPL_RCD = &staDataItems [2];
&log.WriteLine("KEYPROP_EMPL_RCD = " | &ciJOB.GetPropertyByName("KEYPROP_EMPL_RCD"));

&ciJOB.get();
If %Session.ErrorPending Then
&Count = %Session.PSMessages.Count;
For &I = 1 To &Count
&ERROR = %Session.PSMessages.Item(&I);
&TEXT = &ERROR.Text;
&log.WriteLine(&TEXT);
End-For;
Else
&log.WriteLine("get record success !");
End-If;

the component interface "SHEC_CI_JOB_DATA" is created by myself.
i had tested it by application designer , and it works well.
but when i use the code above, it can not get the record.
i had set the same value to the variables. and the log show me the EMPLID,and EMPL_RCD, they are all right. but can not get the record.i don't konw why , can someone help me to solove this problem?
thx !

jarden.cheung 发表于 2008-7-30 18:13

要说的是,数据一定是存在的。我在系统里可以查到
权限列表里也是将该CI加进去了的。并且所有的方法都是public的。

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2007 Comsenz Inc.