tejaswini
8 years agoCreator I
Calling method
Hello,
I want to call server method from client method.I have written both client and server method.
e.g Client method is
var inn = this.getInnovator();
var body = "<days>10</days><order>SO-0005</order>";
var result =
inn.applyMethod("CalculateShipDate", body);
return result;
e.g. Server method is
string sonum = this.getProperty("order");
string days = this.getProperty("days");
//.NET Functions
int daynum = Convert.ToInt16(days);
DateTime date = DateTime.Now.AddDays(daynum);
string strdate = date.ToString("yyyy-MM-dd");
Item itm = this.newItem("Sales Order", "edit");
itm.setAttribute("where",
"[sales_order].so_number='" + sonum + "'");
itm.setProperty("ship_date", strdate);
return itm.apply();
Now I want to know where I need to attach thid method and which event should I apply.