This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - How to open the itemtype condition query data, and then modify and then save to the database

fxjpost - Sunday, December 25, 2011 8:18 PM:

dear all friend

How to open the itemtype condition query data, and then modify and then save to the database?

Use the following code but did not successfully modified

Item cux_formObj=this.newItem("cux_form","get");
cux_formObj.setProperty("cux_field1","fff");
Item retobj=cux_formObj.apply();
cux_formObj.setProperty("cux_field2","test");
cux_formObj.apply();

Please give me some sample code,thanks



fxjpost - Monday, December 26, 2011 1:39 AM:

I have solved this problem
coding...
Item cux_formObj=this.newItem("cux_form","edit");
cux_formObj.setAttribute("where",string.Format("cux_field1='{0}'","fff"));
cux_formObj.setProperty("cux_field2","test");
Item retobj=cux_formObj.apply();
return this;


justinlee - Monday, December 26, 2011 4:31 AM:

dear all friend

How to open the itemtype condition query data, and then modify and then save to the database?

Use the following code but did not successfully modified

Item cux_formObj=this.newItem("cux_form","get");
cux_formObj.setProperty("cux_field1","fff");
Item retobj=cux_formObj.apply();
cux_formObj.setProperty("cux_field2","test");
cux_formObj.apply();

Please give me some sample code,thanks

Hi Xinju,

I think you must use code bellow

retobj.setProperty("cux_field2","test");

cux_formObj.apply('edit');

P/s: Sorry my English

Lee