Display Inventory summary line found in SOOrderEntry on other pages - acumatica

To be more specific, I am referring to the line contained within the SOLine grid:
Is there an easy way to implement the same function they are using to generate this, or would it just be easier if I wrote my own? I did find how to attach it to a grid:
<px:PXGrid ID="grid" runat="server" DataSourceID="ds" Width="100%"
TabIndex="100" SkinID="DetailsInTab" StatusField="Availability"
SyncPosition="True" Height="473px">
Specifically the StatusField attribute of the PXGrid. I also found that the code to perform the action is located in ~/App_Data/CodeRepository/PX.Objects/SO/Descriptor/Attribute.cs. I believe I can imitate the logic that this performs, but I'd like to use it instead of recreating it if that is possible.

I think something like this should give you what you need...
How to display product availability in Opportunity Products Grid footer?
The same logic can be used for any page with a grid.

Related

Can Notes and Files be disabled or hidden?

I'm trying to create a locked down stock item lookup with only a few fields that is ready-only, but I can't disable the Notes and File attachments. I've tried setting up a role with only view access to the stock items screen and locking down the individual objects on the screen and revoking all other screens, including the hidden screens.
I've also tried to create a generic inquiry with view only access but the initial file and note columns still appear and are not locked down.
Is there anyway to do this without creating a custom page? I am working on v5.3.
UPDATE 3/31: Based on my comment below, does overriding the CSS class for the toolbar create any major problems or concerns? I do understand this hides the customization and help button along with the Notes and Files.
<asp:Content ID="cont1" ContentPlaceHolderID="phDS" Runat="Server">
<style type="text/css">
.toolBarT { visibility: hidden; }
</style>
</asp:Content>
The same question has been asked and it sounds like the answer currently is No (there is no way to disable the edit of notes and files).
Duplicate:
Prevent update of note/files on disabled views
To hide this buttons you have to set properties 'FilesIndicator' and 'NotesIndicator' to False (properties belongs to Form control)
Follow up to helenira, here is a sample section (from Portal\Pages\SP\SP700000.aspx):
<px:PXGrid ID="gridInventoryItem" runat="server" DataSourceID="ds"
Width="100%" SkinID="Details" AdjustPageSize="Auto"
FilesIndicator="False" NoteIndicator="False" FastFilterID="edFindItem"
FastFilterFields="InventoryCD,Descr" SyncPosition="True">

How to create ItemTemplate by code in Telerik

I created the following piece of code using Telerik:
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="LinqDataSource1" AllowPaging="True" AutoGenerateColumns="False" Width="50%" AllowSorting="True">
<MasterTableView DataKeyNames="OrderID" DataSourceID="LinqDataSource1" PageSize="5">
<Columns>
<telerik:GridTemplateColumn DataField="Order" HeaderText="Order" UniqueName="Order">
<ItemTemplate>
<asp:Label runat="server" Text='<%#Eval("Order") %>'/>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
How I can declare the code that is within the "ItemTemplate" (the "Label") in the Page.Init?
I think you would need to use the grids ItemDataBound event rather than Page.Init, here is a code example from the telerik site showing how you might implement your logic http://www.telerik.com/help/aspnet-ajax/grid-conditional-image-display-in-grid-column.html
Creating Template Columns Programmatically
When creating template columns programmatically, the grid must be generated completely in the code-behind using the Page_Init event. Then, you must create the templates dynamically in the code-behind and assign them to the ItemTemplate and EditItemTemplate properties of the column. To create a template dynamically, you must define a custom class that implements the ITemplate interface. Then you can assign an instance of this class to the ItemTemplate or EditTemplateTemplate property of the GridTemplateColumn object.
From here
You might have problems with the above approach. If it doesn't work, try creating the whole column programmatically. This above link shows how to implement it.

How to make ext.net RadioGroup a required field?

We are using ext.net. I know how to make a textbox a required field, but am having trouble to force our user to make a selection on the radio group or a check box group. I know someone just assign a default value to one of the radio button, but our customer wants to leave them unchecked in the beginning but forces the web users to make a choice, which is understandable.
It appears IndicatorText and AllowBlank properties are not effective even though they are listed in the IntelliSense.
<ext:RadioGroup ID="rdGrpGender" runat="server"
ItemCls="x-check-group-base" FieldLabel="Gender"
ColumnsWidths="60,60"
IndicatorText="*" IndicatorCls="cssIndicator" AllowBlank="false">
<Items>
<ext:Radio ID="rdoMale" runat="server" BoxLabel="M" />
<ext:Radio ID="rdoFemale" runat="server" BoxLabel="F" />
</Items>
</ext:RadioGroup>
Can any expert help me out? Thanks a lot.
you can validate it like this
<ext:Button ID="Button1" runat="server" Text="Validate"><Listeners><Click Handler="#{rdGrpGender}.validate();" /></Listeners></ext:Button>

XPages: Add a button to a data view custom control

I'm using the Extension Library for creating XPages and I want to use a view, where i can use some inline buttons (buttons in every row of the view) and I also want to use the functionality of the data view where I can expand the content of the current row.
I want to use one of those inline buttons, to expand the content of this row, because before the functionality of this button can be executed, the user has to enter some data in an inputText-field.
So the questions are?
- How can I add inline buttons (using SSJS) to a data view?
- Do you know any other way to solve my problem?
Thanks!
In the Extlib database the expansion with a custom form was done using a link. I would stick to the links -> gives you the most options (client side, server side). Stick to those. If you really need that "buttony" look (which does IMHO not look very much like a web application), use CSS to style the link to look like a button. The OneUI has instructions for that (or steal them from Twitter bootstrap).
The OneUI is worth another look suggesting a different visual clue for expand/collapse.
You should be able to do this within the confines of a dataView by adding a facet for "detail" and using collapsible detail.
For the dataView, set collapsibleDetail="true", add in a panel to the detail facet, then put the elements you want to display when they click to expand in that panel.
<xe:dataView id="dataView1" collapsibleDetail="true" detailsOnClient="true">
<xp:this.facets>
<xp:panel xp:key="detail">
<xp:button id="Mybutton" value="My button"></xp:button>
<xp:label value="This is the label" id="label1" for="Mybutton"></xp:label>
</xp:panel>
</xp:this.facets>
<xe:this.summaryColumn>
<xe:viewSummaryColumn columnName="lastname"></xe:viewSummaryColumn>
</xe:this.summaryColumn>
<xe:this.extraColumns>
<xe:viewExtraColumn columnName="city"></xe:viewExtraColumn>
<xe:viewExtraColumn columnName="state"></xe:viewExtraColumn>
<xe:viewExtraColumn columnName="zip"></xe:viewExtraColumn>
</xe:this.extraColumns>
<xe:this.data>
<xp:dominoView var="view2" viewName="ByName-First"></xp:dominoView>
</xe:this.data>
</xe:dataView>
Now, I'm not positive on how to bind it to the contents of the documents displayed, but I'm sure there's a way. I know how to access the document in a repeat, but not in a dataView, so I would probably do it in a repeat (unless you figure it out and post it to us here!)
Hopefully, that moves you in the right direction.

SharePoint BCS creating a hyperlink column

I am using the .NET connector to connect to an SQL database. One of this value is a URL. Now I need to display this as a URL.
Any ideas on how to solve this?
In Sharepoint Designer you can edit the read list and go to the field, so for example you have a field called URL, display it as a label so it would render like
<asp:Label runat="server" id="ff1{$ID}" text="{$thisNode/#URL}" />
Then all you need to do is add an "A href" tag to it so it renders as a url like such
<asp:Label runat="server" id="ff1{$ID}" text="{$thisNode/#URL}" />

Resources