I am trying to add the Send Quote action from the actions menu in the web app to the mobile app. This is on the sales quote screen (CR304500). I followed the documentation from the Mobile Framework guide, and I was able to add other buttons. The code I'm using for the mobile screen is
update screen CR304500 {
update container "QuoteSummary" {
add recordAction "SendQuote" {
behavior = Void
}
}
}
Thank you in advance.
Turns out because it was in the Actions Folder, I had to enter it as follows.
update screen CR304500 {
update container "QuoteSummary" {
add recordAction "SendQuoteActionsFolder" {
behavior = Void
}
}
}
Related
I am looking for correct integration of Admob Banner ads in my JetPack Compose View.
In my case, I used to load Banner Ads in LazyColumn between various LazyColumn Items. But I am having a problem with combination of LazyColumn and Banner Ad. The banner Ad loads perfectly initially, but once I scroll away from my Ad view and the banner Ad becomes hidden, and then when I scroll back to my banner ad view, the ad view starts to reload again and the previously loaded ad gets killed.
Can anyone please guide me how do I prevent the Banner Ad View to get killed when I scroll away without causing it to reload again and again
The code that I am using is -
//MainView where I load ad
#Composable
fun MainView(){
LazyColumn{
//other contents
item {
BannerAdView()
}
//other contents
}
}
//BannerAdView
#Composable
fun BannerAdView() {
AndroidView(
modifier = Modifier.fillMaxWidth(),
factory = { context ->
AdView(context).apply {
setAdSize(AdSize.BANNER)
adUnitId = context.getString(R.string.adId)
loadAd(AdRequest.Builder().build())
adListener = object : AdListener() {
override fun onAdLoaded() {
isAdLoaded = true
}
}
}
}
)
}
I have a request to add the image from a stock item to the picking screen in the mobile app in Acumatica. I took a look at the Mobile Framework documentation but, there doesn't appear to be a way to show an image in the mobile app. Has anybody tried something like this?
TIA!
I don't think there is a control for ImageURL in the mobile app as of now.
However, as long as your screen holds a Header record with Files(attachments) you could still see the attachments(images) in the mobile application.
For this you can take as an example and guidance the EP301020 - Expense Receipt screen:
add screen EP301020 {
openAs = Form
add container "ClaimDetails" {
formActionsToExpand = 1
add layout "ReceiptNumberHeader" {
displayName = "ReceiptNumberHeader"
layout = "HeaderFirstAttachment"
add field "ReceiptNumber" {
forceIsDisabled = True
}
add field "Status" {
forceIsDisabled = True
}
}
add field "DetailsExpenseDetails#Description"
.....................
attachments {
imageAdjustmentPreset = Receipt
}
}
...............
}
See more details about the layout "HeaderFirstAttachment" here:
https://help.acumatica.com/(W(1))/Help?ScreenId=ShowWiki&pageid=bd31e3a8-538f-47d5-84ff-251ca3d03c43
I'm trying to add the quick process to Acumatica app for sales orders, but when I try to add the container I get this error "sequence contains no matching elements". Am I just using the wrong container?
Here is what I have so far:
update screen SO301000 {
update container "OrderSummary" {
add recordAction "QuickProcess" {
behavior = Void
redirect = True
redirectToContainer = "ProcessOrder"
}
}
add container "ProcessOrder" {
visible = False
fieldsToShow = 2
add field "WarehouseID"
add field "CustomDate"
attachments {
}
}
}
Update it seems that the error happens only when I try to add the field WarehouseID. When I take it out it starts to work, but I do need the field on the app.
I am trying to dynamically add a menu and related actions through a graph extension. The code I have written works in some screens but not in others. I can see the menu appear during post-back but it gets hidden right away: http://recordit.co/T5KSEz7QJv
I have spent a few hours investigating the problem and here's what I found so far:
If I don't add my action to a menu, it works in every cases. The issue is only when using AddMenuAction. I see that there's some logic inside PXAction to show/hide the menu based on visibility of the items inside the menu, but I couldn't figure the problem out.
If the menu itself is directly declared in the graph extension (using public PXAction... and attributes), it works as expected. It is not an option in my case because I am trying to create a generic mechanism that will allow me to add actions to any graph type.
The two following graph extensions highlight this problem - the first one is for Sales Orders entry, and the other for Business Account maintenance. They are identical, except for the graph type parameter:
//This extension works fine, button displays as expected
public class TestButtonsSO : PXGraphExtension<SOOrderEntry>
{
public override void Initialize()
{
base.Initialize();
Type primaryViewItemType = Base.Views[Base.PrimaryView].Cache.GetItemType();
var myMenu = PXNamedAction.AddAction(Base, primaryViewItemType, "MyMenu", "My Menu",
a => a.Get(),
new PXEventSubscriberAttribute[] { new PXButtonAttribute() { MenuAutoOpen = true } });
var action = PXNamedAction.AddAction(Base, primaryViewItemType, "MyMenu$Test", "Test",
a => throw new PXException("Clicked!"),
new PXEventSubscriberAttribute[] { new PXButtonAttribute() { } });
myMenu.AddMenuAction(action);
}
}
//The menu will appear during post-back but gets hidden right away
public class TestButtonsBAccount: PXGraphExtension<BusinessAccountMaint>
{
public override void Initialize()
{
base.Initialize();
Type primaryViewItemType = Base.Views[Base.PrimaryView].Cache.GetItemType();
var myMenu = PXNamedAction.AddAction(Base, primaryViewItemType, "MyMenu", "My Menu",
a => a.Get(),
new PXEventSubscriberAttribute[] { new PXButtonAttribute() { MenuAutoOpen = true } });
var action = PXNamedAction.AddAction(Base, primaryViewItemType, "MyMenu$Test", "Test",
a => throw new PXException("Clicked!"),
new PXEventSubscriberAttribute[] { new PXButtonAttribute() { } });
myMenu.AddMenuAction(action);
}
}
Upon the investigation, this issue seems to be caused by PXGridWithPreview corrupting ToolBarItemCollection in the DataSource. Your approach above will perfectly work on all Acumatica screens, which do not contain a PXGridWithPreview control. For screens already utilizing PXGridWithPreview, we'll have to wait until a fix is realised by Acumatica Engineering Team (will keep this item on my radar and post an update once the fix is available)
I am trying to build a custom button in newest BlackBerry 10 platform.
The button should change background image when it is clicked and then change it back when it is clicked the second time.
The button logic is fairly simple: once clicked, I check for the type of image currently in the button and change the image source.
I started with a basic QML custom control which looks like this (stripped of labels and other unimportant things):
import bb.cascades 1.0
Container
{
id: root
layout: DockLayout
{
}
function clickMe()
{
var source = myImage.defaultImageSource.toString();
console.log(source);
if (source.endsWith("image.png"))
{
myImage.defaultImageSource = "asset:///images/image_pushed.png";
}
else
{
myImage.defaultImageSource = "asset:///images/image.png";
}
}
ImageButton
{
id: myImage
defaultImageSource: "asset:///images/image.png"
}
onCreationCompleted:
{
myImage.clicked.connect(root.clickMe);
}
}
ImageButton click event is connected to JavaScript function clickMe. The function fires and the URL is logged to console correctly.
The problem is the IF clause, because the image_pushed.png is never set. Why is this the problem and how can I implement this button?
I am looking around for a only QML solution for this problem and I found this information:
the defaultImageSource property is of type QUrl, which does contain
toString() method.
toString() method returns QString, which indeed has function endsWith.
my QML reference: http://qt-project.org/doc/qt-4.8/qstring.html#endsWith
Thanks.
Within QML QString instances appear to be a normal JavaScript strings. This mapping is done automatically. And Javascript strings don't have a endsWith method. You can use the search method with an regular expression to achieve the same.
if (source.search(/image\.png$/ !== -1) { /* ... */ }
I think you can create more simple way by using property
for example:
Control{
id : myControl
property bool state
ImageButton{
defaultImageSource : state ? "firstImageAsset.png" : "secondImageAsset.png"
onClick :{
myControl.state = !myControl.state
}
}
}