acumatica - Add extra note field to grid line -


i have client add note field grid. if not possible, there way have large text field in grid uses pop window editing large amount of text in field?

priority: 1.) add note field grid, if possible. 2.) failing #1, there way add popup window edit large standard user text field.

i believe answer number 1 question no. if grid has note cannot have another. had question come before.

for #2, should able smart panel displays field. use pxtextedit , setup new view panel point based on selected/current row.

to add smart panel (pop panel) need handful of things in place. prefer using aef graph , table extensions. there documentation in t200/t300 training material these topics. in example add note ability sales order page. copied of logic existing "po link" button , panel posupplyok pxaction , currentposupply view (page so301000).

first need new field add sales line extension table/field:

 [pxtable(typeof(soline.ordertype), typeof(soline.ordernbr), typeof(soline.linenbr), isoptional = true)] public class solineextension : pxcacheextension<soline> {     #region xxmynote     public abstract class xxmynote : px.data.ibqlfield     {     }     protected string _xxmynote;     [pxdbstring]     [pxuifield(displayname = "my note")]     public virtual string xxmynote     {                 {             return this._xxmynote;         }         set         {             this._xxmynote = value;         }     }     #endregion } 

then need create new graph extension add view panel , pxaction button open panel.

public class soorderentryextension : pxgraphextension<soorderentry> {      public pxselect<soline,         where<soline.ordertype, equal<current<soline.ordertype>>,             and<soline.ordernbr, equal<current<soline.ordernbr>>,                 and<soline.linenbr, equal<current<soline.linenbr>>>>>> mypanelview;      public pxaction<soorder> mynoteaction;     [pxuifield(displayname = "add note", mapviewrights = pxcacherights.select, mapenablerights = pxcacherights.update)]     [pxbutton(imagekey = px.web.ui.sprite.main.dataentryf)]     protected virtual ienumerable mynoteaction(pxadapter adapter)     {         if (base.transactions.current != null &&             mypanelview.askext() == webdialogresult.ok)         {             //extra stuff here if needed when ok pushed         }          return adapter.get();     } } 

now need "edit" sales order page. need changes customization project , go edit page direct in visual studio under site\pages\so in example. come , paste in code customization project opening project , performing following steps:

  1. click on screens , + sign add new screen
  2. enter so301000 , save
  3. click on so301000 hyperlink open layout editor sales order
  4. click actions > edit aspx
  5. paste in changes (mentioned below)

in so301000 page add following:

[1] add ds callback command within pxdatasource tag

<px:pxdscallbackcommand name="mynoteaction" visible="false"      commitchanges="true" dependongrid="grid" /> 

[2] add button toolbar above sales line grid adding following pxgrid > actionbar > customitems tags of grid in document details tab. (just search "po link" in page find location easier or of listed buttons above grid).

<px:pxtoolbarbutton text="add note" dependongrid="grid">     <autocallback command="mynoteaction" target="ds" /> </px:pxtoolbarbutton> 

[3] add panel code represents panel like. can play around sizing fit needs, make sure set pxtextedit use multiline using following example code. @ current sales order page know fits page syntax:

<px:pxsmartpanel id="pxsmartpanelnote" runat="server" caption="my note panel caption"     captionvisible="true" designview="hidden" loadondemand="true" key="mypanelview" createondemand="false" autocallback-enabled="true"     autocallback-target="formmynote" autocallback-command="refresh" callbackmode-commitchanges="true" callbackmode-postdata="page"     acceptbuttonid="btnmynoteok">     <px:pxformview id="formmynote" runat="server" datasourceid="ds" style="z-index: 100" width="100%" captionvisible="false"         datamember="mypanelview">         <contentstyle backcolor="transparent" borderstyle="none" />         <template>             <px:pxlayoutrule id="pxlayoutrule44" runat="server" startcolumn="true" labelswidth="s" controlsize="xm" />             <px:pxtextedit id="cstxxmynote" runat="server" datafield="xxmynote" textmode="multiline"/>         </template>     </px:pxformview>     <px:pxpanel id="pxpanel10" runat="server" skinid="buttons">         <px:pxbutton id="btnmynoteok" runat="server" dialogresult="ok" text="ok"/>     </px:pxpanel> </px:pxsmartpanel> 

i have not tested above quick slap brought panel no errors. using version 6.00.0955 same steps should work in 5.x versions. hope helps.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -