Skip to main content
Solved

Push notifications not triggering when GI has condition on custom field


chris49
Varsity II
Forum|alt.badge.img

We’ve had a push notification which has been working for quite some time, and then a couple of months ago, it simply stopped firing/triggering push notifications.

After some investigation, it appears that when you make use of a custom field in the conditions tab of the GI that’s being monitored, it simply doesn’t trigger. 

To test my theory, I set up a super basic GI and managed to get push notifications to go through to https://webhook.site/

However, as soon as I add a custom field into the condition tab of the same GI, the push notifications no longer trigger. 

 

Based on this test, it looks like custom fields are no longer supported. We recently upgraded to the version 23.112.0032. 

Is anyone else aware of this change, and what options do I have to trigger push notifications based on a custom field on the SOOrder changing?

Best answer by chris49

This issue has been confirmed as a bug in the version we were using at the time. It has been fixed in 2024 R1

View original
Did this topic help you find an answer to your question?

16 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 680 replies
  • January 19, 2024

Hi @chris49 ,

For the SOOrder.SBStatus condition, you assigned the Contact.Customer. Is this correct?

If you view the inquiry, are you able to fetch the data?


chris49
Varsity II
Forum|alt.badge.img
  • Author
  • Varsity II
  • 53 replies
  • January 19, 2024

Hey @jinin , yes, I am indeed able to fetch the information. Note that SBStatus is a field on the order, not on the contact/customer.


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 680 replies
  • January 19, 2024

Could you please export the GI as XML and share it?


chris49
Varsity II
Forum|alt.badge.img
  • Author
  • Varsity II
  • 53 replies
  • January 19, 2024

Hi @jinin , please find attached.

Many thanks


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 680 replies
  • January 19, 2024

Hi @chris49 ,

I created a field on the SOScreen and tested it, and it worked for me. I've included a sample customization package with a custom field, GI, and push notification. Please review, and feel free to reach out if you have any questions.


chris49
Varsity II
Forum|alt.badge.img
  • Author
  • Varsity II
  • 53 replies
  • January 22, 2024

Hi @jinin ,

Thank you kindly. I will try this out on a test environment, and have a look at the differences. I’m still quite a bit dumbfounded by this, as this used to work perfectly fine, and just stopped all of a sudden. 

I will revert with some feedback soon.

Thanks


chris49
Varsity II
Forum|alt.badge.img
  • Author
  • Varsity II
  • 53 replies
  • January 22, 2024

Hey @jinin ,

Awesome, so I tested your version, and indeed it works. I wasn’t sure if this makes a difference, but I do not add my custom fields directly onto the SOOrder table in the way that your install script does, instead I’ve added a custom table that links to the SOOrder table since there were quite a few fields that related to what we did to implement the functionality. 

 Attached is the customisation project that creates the custom table, and then adds the fields to the Order screen under the ‘Back Order Details’ tab. In particular, the field that I’m having an issue with is the SBStatus field, which in turn is a field that makes use of the SBSOOrderBackOrderStatus class to obtain its list of key => value pairs. 

With that being said, I now wonder whether it’s not a case of, “Push notifications are not triggering when a GI has a condition on a custom field, which is from a custom table joined to the SOOrder table”?

I’m not too sure whether you will be able to see the above-mentioned classes, etc. from the customisation script directly, so herewith are the 2 classes’ code:

using PX.Data;
using PX.Data.BQL;

namespace SBSOOrderEnhancements
{
    public class SBSOOrderBackOrderStatus
    {
        public const string NewT = "N";
        public const string NewText = "New";
        public const string ContactCustomer = "C";
        public const string ContactCustomerText = "Contact Customer";
        public const string WaitingForCustomer = "W";
        public const string WaitingForCustomerText = "Waiting for Customer Feedback";
        public const string CustomerWaiting = "H";
        public const string CustomerWaitingText = "Happy to Wait";

        public class ListAttribute : PXStringListAttribute
        {
            public ListAttribute() : base(
                new[]
                {
                    Pair(NewT, NewText),
                    Pair(ContactCustomer, ContactCustomerText),
                    Pair(WaitingForCustomer, WaitingForCustomerText),
                    Pair(CustomerWaiting, CustomerWaitingText),
                }
            ){ }
        }

        public class newT : BqlString.Constant<newT> { public newT() : base(NewT) { } }
        public class contactCustomer : BqlString.Constant<contactCustomer> { public contactCustomer() : base(ContactCustomer) { } }
        public class waitingForCustomer : BqlString.Constant<waitingForCustomer> { public waitingForCustomer() : base(WaitingForCustomer) { } }
        public class customerWaiting : BqlString.Constant<customerWaiting> { public customerWaiting() : base(CustomerWaiting) { } }
    }
}
using PX.Data;
using PX.Data.BQL;
using PX.Objects.SO;
using System;

namespace SBSOOrderEnhancements
{
    [Serializable]
    [PXCacheName("SilvertreeBrands Back Orders")]
    [PXTable(typeof(SOOrder.orderType), typeof(SOOrder.orderNbr), IsOptional = true)]
    public class SBSOOrderBackOrder : PXCacheExtension<SOOrder>
    {
        #region SBStatus
        [PXDBString(1, IsFixed = true)]
        [PXDefault("N", PersistingCheck = PXPersistingCheck.Nothing)]
        [PXUIField(DisplayName = "Status", Visibility = PXUIVisibility.SelectorVisible)]
        [SBSOOrderBackOrderStatus.List]
        public virtual string SBStatus { get; set; }
        public abstract class sBStatus : BqlString.Field<sBStatus> { }
        #endregion

        #region SBComment
        [PXDBLocalizableString(IsUnicode = true)]
        [PXUIField(DisplayName = "Comments")]
        public virtual string SBComment { get; set; }
        public abstract class sBComment : BqlString.Field<sBComment> { }
        #endregion

        #region SBETADate
        [PXDBDate()]
        [PXUIField(DisplayName = "ETA", Visibility = PXUIVisibility.SelectorVisible)]
        public virtual DateTime? SBETADate { get; set; }
        public abstract class sBETADate : BqlString.Field<sBETADate> { }
        #endregion

        #region SBNewDate
        [PXDBDate()]
        [PXUIField(DisplayName = "New", Visibility = PXUIVisibility.SelectorVisible)]
        public virtual DateTime? SBNewDate { get; set; }
        public abstract class sBNewDate : BqlString.Field<sBNewDate> { }
        #endregion

        #region SBContactCustomerDate
        [PXDBDate()]
        [PXUIField(DisplayName = "Contact Customer", Visibility = PXUIVisibility.SelectorVisible)]
        public virtual DateTime? SBContactCustomerDate { get; set; }
        public abstract class sBContactCustomerDate : BqlString.Field<sBContactCustomerDate> { }
        #endregion

        #region SBAwaitCustomerFeedbackDate
        [PXDBDate()]
        [PXUIField(DisplayName = "Waiting For Feedback", Visibility = PXUIVisibility.SelectorVisible)]
        public virtual DateTime? SBAwaitCustomerFeedbackDate { get; set; }
        public abstract class sBAwaitCustomerFeedbackDate : BqlString.Field<sBAwaitCustomerFeedbackDate> { }
        #endregion

        #region SBCustomerWaitingDate
        [PXDBDate()]
        [PXUIField(DisplayName = "Happy to Wait", Visibility = PXUIVisibility.SelectorVisible)]
        public virtual DateTime? SBCustomerWaitingDate { get; set; }
        public abstract class sBCustomerWaitingDate : BqlString.Field<sBCustomerWaitingDate> { }
        #endregion
    }
}

 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 680 replies
  • January 23, 2024

Hi @chris49 ,

I've published the package and checked, but it's not working with the SBStatus field. I will review the code and get back to you.


chris49
Varsity II
Forum|alt.badge.img
  • Author
  • Varsity II
  • 53 replies
  • January 23, 2024

Hi @jinin ,

Thank you very much 🙏🏻 , looking forward to your response.


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2621 replies
  • March 18, 2024

Hi @chris49 were you able to find a solution? Thank you!


chris49
Varsity II
Forum|alt.badge.img
  • Author
  • Varsity II
  • 53 replies
  • March 19, 2024
Chris Hackett wrote:

Hi @chris49 were you able to find a solution? Thank you!

Good morning @Chris Hackett , 

No, not yet. I’ve logged a case with Acumatica Support, and they are investigating the matter. 


chris49
Varsity II
Forum|alt.badge.img
  • Author
  • Varsity II
  • 53 replies
  • Answer
  • October 1, 2024

This issue has been confirmed as a bug in the version we were using at the time. It has been fixed in 2024 R1


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • 2621 replies
  • October 1, 2024

Thank you for sharing this info with the community @chris49!


Forum|alt.badge.img
  • Jr Varsity III
  • 13 replies
  • October 8, 2024
chris49 wrote:

This issue has been confirmed as a bug in the version we were using at the time. It has been fixed in 2024 R1

Hi Chris,

Could you please share the build number of 24r1 in which this bug has been fixed


chris49
Varsity II
Forum|alt.badge.img
  • Author
  • Varsity II
  • 53 replies
  • October 9, 2024

Hi @abaranovhs , I haven’t tested it as working, but took it on the word from the feedback received from the Acumatica support team. They advised that it will be working from the start of 2024R1 release.


chris49
Varsity II
Forum|alt.badge.img
  • Author
  • Varsity II
  • 53 replies
  • October 16, 2024

Hi @abaranovhs ,

Just some confirmation for you on the above: I have now confirmed that this is working 100% again.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings