I have a problem with disabling ribbon button via javascript custom rule.
The action for that I want to add "enable rule" is called Mscrm.AddExistingRecordFromSubGridAssociated -> which is displayed when subgrid gets focus.
I use the ribbon workbench solution and I almost sure I did everything fine, but it doesn't work.
javascript:
utils.ribbon.isAddExistingDisabled = function(grid) {
return false; //just for test I wrote always false, but it's enabled anyway :/
}
CommandDef:
<CommandDefinition Id="Mscrm.AddExistingRecordFromSubGridAssociated">
<EnableRules>
<EnableRule Id="Mscrm.AppendToPrimary" />
<EnableRule Id="Mscrm.EntityFormIsEnabled" />
<EnableRule Id="my.incident.addMainCause.EnableRule" />
</EnableRules>
<DisplayRules>
<DisplayRule Id="Mscrm.AddExisting" />
<DisplayRule Id="Mscrm.ShowForManyToManyGrids" />
<DisplayRule Id="Mscrm.AppendToPrimary" />
<DisplayRule Id="Mscrm.AppendSelected" />
</DisplayRules>
<Actions>
<JavaScriptFunction FunctionName="Mscrm.GridRibbonActions.addExistingFromSubGridAssociated" Library="/_static/_common/scripts/RibbonActions.js">
<CrmParameter Value="SelectedEntityTypeCode" />
<CrmParameter Value="SelectedControl" />
</JavaScriptFunction>
</Actions>
</CommandDefinition>
Enable rule def:
<EnableRule Id="my.incident.addMainCause.EnableRule">
<CustomRule FunctionName="utils.ribbon.isAddExistingDisabled" Library="$webresource:my_js/incident/common.js" InvertResult="false">
<CrmParameter Value="SelectedControl" />
</CustomRule>
</EnableRule>
Related
I have a PXSmartPanel on the Sales Orders form (SO301000) in Acumatica ERP (v21.109.0018). In the PXSmartPanel I have a PXTab with two PXTabItem's. Each tab item has a PXGrid in it.
Whenever the smart panel opens, the grid in the first tab item shows with the correct data. But when I select the other tab item, the grid doesn't show at all (no data, no column names, no toolbar actions). I'm not sure if there's an attribute that I'm missing, but any help would be appreciated.
Here is my ASPX code for the PXSmartPanel. The grid with the ID "GridKitNonStkComponents" is the one that isn't showing:
<px:PXSmartPanel runat="server" ID="KitComponentsPanel" DesignView="Content" AllowResize="true"
AcceptButtonID="KitComponentSaveButton" CancelButtonID="KitComponentCancelButton" LoadOnDemand="true"
CaptionVisible="true" Caption="Kit Component Items" Key="KitComponentsPanel"
AutoRepaint="true" style="position:static;" Height="400px" Width="560px">
<px:PXTab ID="kitCompTab" runat="server" Width="100%" Height="85%">
<Items>
<px:PXTabItem Text="Stock Components">
<Template>
<px:PXGrid runat="server" ID="GridKitStkComponents" Height="100%" Width="100%" SyncPosition="true">
<Levels>
<px:PXGridLevel DataMember="KitStkComponents">
<Columns>
<px:PXGridColumn DataField="CompInventoryID" Width="70" CommitChanges="True" />
<px:PXGridColumn DataField="CompDescription" Width="280" />
<px:PXGridColumn DataField="ComponentQty" />
</Columns>
</px:PXGridLevel>
</Levels>
<ActionBar Position="Top">
<Actions>
<AddNew MenuVisible="True" />
<Save MenuVisible="False" Enabled="False" />
<Search MenuVisible="False" Enabled="False" />
<NoteShow Enabled="False" MenuVisible="False" />
<Refresh MenuVisible="True" />
<Delete MenuVisible="True" />
<AdjustColumns MenuVisible="True" />
<ExportExcel MenuVisible="True" />
</Actions>
<CustomItems>
<px:PXToolBarButton>
<AutoCallBack Command="ResetStkCompsToDefault" Target="ds">
<Behavior CommitChanges="true" />
</AutoCallBack>
</px:PXToolBarButton>
</CustomItems>
</ActionBar>
<AutoSize Enabled="true" />
</px:PXGrid>
</Template>
</px:PXTabItem>
<px:PXTabItem Text="Non-Stock Components" LoadOnDemand="true">
<Template>
<px:PXGrid runat="server" ID="GridKitNonStkComponents" Height="100%" Width="100%" SyncPosition="true">
<Levels>
<px:PXGridLevel DataMember="KitNonStkComponents">
<Columns>
<px:PXGridColumn DataField="CompInventoryID" Width="70" CommitChanges="True" />
<px:PXGridColumn DataField="CompDescription" Width="280" />
<px:PXGridColumn DataField="ComponentQty" />
</Columns>
</px:PXGridLevel>
</Levels>
<ActionBar Position="Top">
<Actions>
<AddNew MenuVisible="True" />
<Save MenuVisible="False" Enabled="False" />
<Search MenuVisible="False" Enabled="False" />
<NoteShow Enabled="False" MenuVisible="False" />
<Refresh MenuVisible="True" />
<Delete MenuVisible="True" />
<AdjustColumns MenuVisible="True" />
<ExportExcel MenuVisible="True" />
</Actions>
<CustomItems>
<px:PXToolBarButton>
<AutoCallBack Command="ResetNonStkCompsToDefault" Target="ds">
<Behavior CommitChanges="true" />
</AutoCallBack>
</px:PXToolBarButton>
</CustomItems>
</ActionBar>
<AutoSize Enabled="true" />
</px:PXGrid>
</Template>
</px:PXTabItem>
</Items>
</px:PXTab>
<px:PXPanel ID="KitComponentButtonPanel" runat="server" SkinID="Buttons">
<px:PXButton ID="KitComponentSaveButton" runat="server" DialogResult="OK" Text="Save" />
<px:PXButton ID="KitComponentCancelButton" runat="server" DialogResult="Cancel" Text="Cancel" />
</px:PXPanel>
</px:PXSmartPanel>
Here is the code for my graph extension (at the moment, the EditKitComponents action just opens the smart panel):
public class SOOrderEntry_Extension : PXGraphExtension<SOOrderEntry>
{
public static bool IsActive() => true;
#region Selects / Views
public SelectFrom<SOLineKitComponent>.
Where<SOLineKitComponent.soOrderType.IsEqual<SOLine.orderType.FromCurrent>.
And<SOLineKitComponent.soOrderNbr.IsEqual<SOLine.orderNbr.FromCurrent>>.
And<SOLineKitComponent.soLineNbr.IsEqual<SOLine.lineNbr.FromCurrent>>.
And<SOLineKitComponent.kitInventoryID.IsEqual<SOLine.inventoryID.FromCurrent>>.
And<SOLineKitComponent.stkItem.IsEqual<True>>>.View KitStkComponents;
public SelectFrom<SOLineKitComponent>.
Where<SOLineKitComponent.soOrderType.IsEqual<SOLine.orderType.FromCurrent>.
And<SOLineKitComponent.soOrderNbr.IsEqual<SOLine.orderNbr.FromCurrent>>.
And<SOLineKitComponent.soLineNbr.IsEqual<SOLine.lineNbr.FromCurrent>>.
And<SOLineKitComponent.kitInventoryID.IsEqual<SOLine.inventoryID.FromCurrent>>.
And<SOLineKitComponent.stkItem.IsEqual<False>>>.View KitNonStkComponents;
public SelectFrom<SOOrder>.View KitComponentsPanel;
#endregion
#region Actions
public PXAction<SOOrder> EditKitComponents;
[PXButton]
[PXUIField(DisplayName = "Edit Kit Components")]
public virtual void editKitComponents()
{
if(KitComponentsPanel.AskExt() == WebDialogResult.OK)
{
}
}
#endregion
}
Here is what the smart panel looks like when the different tab items are selected:
Tab Item with Grid Showing
Tab Item with Grid Not Showing
You need to set the "LoadOnDemand" to false for the whole PXSmartPanel to have the second tab working.
<px:PXSmartPanel runat="server" ID="KitComponentsPanel"
...
LoadOnDemand="False"
...
>
I would also consider setting LoadOnDemand to false for the second tab.
<px:PXTabItem Text="Non-Stock Components" LoadOnDemand="false">
I am creating a draft envelope with a TXT document - which needs to display an Approve button to allow the signer to sign without placing a signature/initials on the document itself. Unfortunately I can't get the Approve button to show on the document, where have I gone wrong?
Here is the Request XML:
<ns1:envelopeDefinition xmlns:ns1="http://www.docusign.com/restapi">
<ns1:emailSubject>Test from iPaaS</ns1:emailSubject>
<ns1:documents>
<ns1:document>
<ns1:name>TestDocument</ns1:name>
<ns1:documentId>1</ns1:documentId>
<ns1:documentBase64><Base64BytesHere></ns1:documentBase64>
<ns1:fileExtension>txt</ns1:fileExtension>
</ns1:document>
</ns1:documents>
<ns1:recipients>
<ns1:signers>
<ns1:signer>
<ns1:routingOrder>1</ns1:routingOrder>
<ns1:recipientId>1</ns1:recipientId>
<ns1:name>John Smith</ns1:name>
<ns1:email>nobody#nobody.com</ns1:email>
</ns1:signer>
</ns1:signers>
</ns1:recipients>
<ns1:tabs>
<ns1:approveTabs>
<ns1:approve>
<anchorCaseSensitive />
<anchorHorizontalAlignment />
<anchorIgnoreIfNotPresent />
<anchorMatchWholeWord />
<anchorString />
<anchorUnits />
<anchorXOffset />
<anchorYOffset />
<conditionalParentLabel />
<conditionalParentValue />
<customTabId />
<documentId>1</documentId>
<mergeField />
<pageNumber>1</pageNumber>
<recipientId>1</recipientId>
<tabId />
<tabOrder />
<templateLocked />
<templateRequired />
<xPosition>100</xPosition>
<yPosition>100</yPosition>
<bold />
<font />
<fontColor />
<fontSize />
<italic />
<tabLabel />
<underline />
<buttonText />
<height>30</height>
<width>50</width>
</ns1:approve>
</ns1:approveTabs>
</ns1:tabs>
</ns1:envelopeDefinition>
Essentially I am looking for something that looks like the attached screenshot
The <tabs> node should be inside the <signer> node. The following example should work.
<ns1:envelopeDefinition xmlns:ns1="http://www.docusign.com/restapi">
<ns1:emailSubject>Test from iPaaS</ns1:emailSubject>
<ns1:documents>
<ns1:document>
<ns1:name>TestDocument</ns1:name>
<ns1:documentId>1</ns1:documentId>
<ns1:fileExtension>txt</ns1:fileExtension>
<ns1:documentBase64>RG9jIFRXTyBUV08gVFdP</ns1:documentBase64>
<ns1:fileExtension>txt</ns1:fileExtension>
</ns1:document>
</ns1:documents>
<ns1:recipients>
<ns1:signers>
<ns1:signer>
<ns1:routingOrder>1</ns1:routingOrder>
<ns1:recipientId>1</ns1:recipientId>
<ns1:name>John Smith</ns1:name>
<ns1:email>johnsmith#acme.com</ns1:email>
<ns1:tabs>
<ns1:approveTabs>
<ns1:approve>
<documentId>1</documentId>
<pageNumber>1</pageNumber>
<xPosition>100</xPosition>
<yPosition>100</yPosition>
<height>30</height>
<width>50</width>
</ns1:approve>
</ns1:approveTabs>
</ns1:tabs>
</ns1:signer>
</ns1:signers>
</ns1:recipients>
</ns1:envelopeDefinition>
How To Add menu when rightclick on dynamic grid in ext.net ?
I Had Tried As Below In RowExpander, It is Showing That ItemContextMenu does not support in RowExpander, Please Help me ?
<ext:RowExpander runat="server">
<Loader runat="server" DirectMethod="#{DirectMethods}.GetGrid" Mode="Component">
<LoadMask ShowMask="true" />
<Params>
<ext:Parameter Name="RecordId" Value="this.record.getId()" Mode="Raw" />
</Params>
</Loader>
<DirectEvents>
<BeforeExpand OnEvent="BeforeExpand" Success="setRaw(response, result, el, type, action, extraParams);" Before="return !record.cached;">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={gridRecords.body}" />
<ExtraParams>
<%--<ext:Parameter Name="company" Value="record.data['company']" Mode="Raw" />
<ext:Parameter Name="id" Value="record.id" Mode="Raw" />
<ext:Parameter Name="index" Value="rowIndex" Mode="Raw" /> --%>
<ext:Parameter Name="RecordId" Value="record.get('RecordId')" Mode="Raw" />
</ExtraParams>
</BeforeExpand>
</DirectEvents>
<Listeners>
<ItemContextMenu Handler="e.preventDefault(); #{mnuView}.showAt(e.getXY());" />
</Listeners>
</ext:RowExpander>
RowExpander doesn't have an ItemContextMenu event. You should define it for a child GridPanel itself.
It is being discussed in greater details in these forum threads:
Forum thread #1
Forum thread #2
I uploaded a zipped folder with my config.xml file in the root. I don't get any build errors. After the build it doesn't show any plugins, any icons, any information in my config.xml file whatsoever. The only notification I get is "This app isn't using the latest version of PhoneGap. We recommend upgrading to 3.7.0." — in fact, it shows PhoneGap Build 3.3.0.
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.parker.products.2015"
versionCode="1"
version = "0.0.1">
<name>Products</name>
<description>Easily view Parker Aerospace products and component information on iOS devices for reference or convenient use with customers and industry colleagues.</description>
<gap:platform name="ios" />
<preference name="phonegap-version" value="3.7.0" />
<preference name="orientation" value="default" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="false" />
<preference name="DisallowOverscroll" value="true"/>
<preference name="disallowOverscroll" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="prerendered-icon" value="true" />
<icon src="res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57" />
<icon src="res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="res/icon/ios/icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="res/icon/ios/icon-120.png" gap:platform="ios" width="120" height="120" />
<icon src="res/icon/ios/icon-152.png" gap:platform="ios" width="152" height="152" />
<gap:splash src="res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />
<gap:splash src="res/screen/ios/screen-iphone-landscape.png" gap:platform="ios" width="480" height="320" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="res/screen/ios/screen-iphone-landscape-2x.png" gap:platform="ios" width="960" height="640" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024 " />
<gap:splash src="res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />
<gap:splash src="res/screen/ios/screen-ipad-portrait-2x.png" gap:platform="ios" width="1536" height="2008" />
<gap:splash src="res/screen/ios/screen-ipad-landscape-2x.png" gap:platform="ios" width="2048" height="1496" />
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="de.appplant.cordova.plugin.email-composer" />
<gap:plugin name="org.apache.cordova.network-information" />
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<gap:plugin name="com.phonegap.plugin.statusbar" />
</widget>
I've been trying to figure this out for days. Any ideas?
#Lisa, sometimes when the compiler fails, it drops references after that. Try removing all your plugins and add them back one at a time. It is tedious, but I found one bug like that. NOTE: It might be easier to start with a blank App, then to use the one you've put hours into.
FWIW: I do every plugin in a simple App, then add it to my main App. This allows me to test that plugin for bugs, then when I find them (bugs) I do less backtracking. It works sometimes. --Jesse
I have a RadGrid with KeyboardNavigation allowed, RowSelection enabled.
When i click on a row using the mouse, the post back happens and i perform the necessary operations that i wish to do.
Now, when i use the keyboard up/down keys to change the row selection, the grid does change the SelectedRow (the display shows the selection happening). But the control does not post back in this case.
Anybody know how to create a postback after a row is changed by the keyboard?
jai telengana
function keyPress(sender, args) {
if (args.get_keyCode() == 13) {
args.set_cancel(true);
if (sender._activeRow) {
sender._activeRow.click();
}
}
}
<telerik:RadGrid ID="Manage_Group_RadGrid" AllowFilteringByColumn="true" OnItemCommand="Manage_Group_RadGrid_ItemCommand" AllowPaging="true" AllowMultiRowSelection="true" OnItemDataBound="Manage_Group_RadGrid_ItemDataBound" ShowStatusBar="true"
AllowSorting="true" OnDataBinding="Manage_Group_RadGrid_DataBinding" OnNeedDataSource="Manage_Group_RadGrid_NeedDataSource" GroupingEnabled="true" ShowGroupPanel="true" OnGroupsChanging="Manage_Group_RadGrid_GroupsChanging"
PagerStyle-AlwaysVisible="true"
PageSize="15" Height="440px"
DataKeyNames="cn" runat="server">
<EditItemStyle BackColor="green" />
<MasterTableView DataKeyNames="cn" AutoGenerateColumns="false"
PagerStyle-AlwaysVisible="true" GroupsDefaultExpanded="false" CommandItemDisplay="Top">
<Columns>
<telerik:GridBoundColumn DataField="cn" HeaderText="cn" SortExpression="cn" UniqueName="cn"
ItemStyle-Width="200px" HeaderStyle-Width="200px" />
<telerik:GridBoundColumn DataField="cn" HeaderText="sAMAccountName" SortExpression="sAMAccountName" UniqueName="sAMAccountName"
ItemStyle-Width="200px" HeaderStyle-Width="200px" />
</Columns>
<CommandItemSettings ShowAddNewRecordButton="false" />
</MasterTableView>
<GroupingSettings CaseSensitive="false" />
<GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
<ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="false">
**<ClientEvents OnKeyPress="keyPress" />**
<Selecting AllowRowSelect="true" />
</ClientSettings>
</telerik:RadGrid>