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.
Hello,
Could you please elaborate on your use case? Looking at the code you provided, it looks like you're expecting the user to be able to change the shipment date of an item. In that case, it may make the most sense to call this form a Client Action. However, depending on your use case, there's numerous different approaches that could be implemented.
Chris
_____________________________________________
Christopher Gillis
Aras Labs Software Engineer
Hello,
Could you please elaborate on your use case? Looking at the code you provided, it looks like you're expecting the user to be able to change the shipment date of an item. In that case, it may make the most sense to call this form a Client Action. However, depending on your use case, there's numerous different approaches that could be implemented.
Chris
_____________________________________________
Christopher Gillis
Aras Labs Software Engineer