Acumatica event handle refresh page on time -
i've added more 3 field on cases (screenid=cr306000) 1. usrhours 2. usrminutes 3. usrseconds code editor: crcasemaint (cases):
private static int i; private static int j; private static int k; public pxaction<px.objects.cr.crcase> buttonstart; [pxbutton(imagekey = px.web.ui.sprite.main.process)] [pxuifield(displayname = "start")] protected void buttonstart() { var row1 = (crcase)base.case.current; crcaseext rowext1 = pxcache<crcase>.getextension<crcaseext>(row1); i++; if(i > 59){ i=0; rowext1.usrseconds = "00"; j++; if(j > 59){ j=0; rowext1.usrminutes = "00"; k++; if(k > 59){ k=0; rowext1.usrhours = "00"; } else if(k < 10){ rowext1.usrhours = "0" + k; } else{ rowext1.usrhours = k.tostring(); } } else if(j < 10){ rowext1.usrminutes = "0" + j; } else{ rowext1.usrminutes = j.tostring(); } } else if(i < 10){ rowext1.usrseconds = "0" + i; } else{ rowext1.usrseconds = i.tostring(); } }
right i'm using (1) button , when click it, it'll increase 1 one. want know how can write (2) button? need write javascript , add action button? if want update on load (refresh page on time), event handle of acumatica can use?
first hide button shown acumatica on datasource. this,
- go customization project [acumatica]
- add screen there
- open screen , go datasource
- add button manually datasource
- se properties [name = buttonstart, visible = false]
now manually add new button correct position in screen , set properties [target = ds(datasource name), command = buttonstart]
so new button trigger same action written in graph.
Comments
Post a Comment