Solved

BigCommerce 21R1: To Put Acumatica Sales Order on Hold at the time of order Import, based on some conditions

  • 5 August 2021
  • 4 replies
  • 212 views

Userlevel 4
Badge

Hello Everyone,

I have one scenario where I want to put Sales Order on Hold at the time of order import from BigCommerce to Acumatica based on some conditions.

I have implemented some logic in 19R2 build and that is working as expected there, as after checking required conditions, I used to set impl.Hold = true.ValueField(); please find below code sample for reference.

public delegate void MapBucketImportDelegate(BCSalesOrderBucket bucket, IMappedEntity existing);
        [PXOverride]
        public void MapBucketImport(BCSalesOrderBucket bucket, IMappedEntity existing, MapBucketImportDelegate baseMethod)
        {
            baseMethod(bucket, existing);

            MappedOrder obj = bucket.Order;
            OrderData data = obj.Extern;
            SalesOrder impl = obj.Local;
            
            impl.Hold = true.ValueField(); // This implementation working fine in 19R2
        }

 

Now, coming to 21R1 we do not have Hold checkbox on Sales Order screen and instead we have Hold button to put the document on hold. So, the 19R2 implementation is not working here.

I tried below ways to achieve that but that did not helped. Please find below samples for reference:

  • Keeping the 19R2 implementation as it is, to set impl.Hold = true.ValueField();
  • Overridden Persist method on Sales Order Entry graph.
  • Calling Base.putOnHold.Press(); before base save.

        public delegate void PersistDelegate();
        [PXOverride]
        public void Persist(PersistDelegate del)
        {          
            if (Base.Document.Current != null && Base.IsImport == true)
            {           
                Base.putOnHold.Press();             
            }

            del();            
        }

  • Calling Base.putOnHold.Press(); after base save.

        public delegate void PersistDelegate();
        [PXOverride]
        public void Persist(PersistDelegate del)
        {            
            del();
                                           
            if (Base.Document.Current != null && Base.IsImport == true)
            {               
                 Base.putOnHold.Press();
            }
        }

  • The other way I thought to set Sales Order Status to Hold, but that not seems to be proper way to put document on Hold.

 

Can someone suggest the best possibility way to achieve this please.

 

Thank you in advance !

icon

Best answer by smarenich 6 August 2021, 20:24

View original

4 replies

Userlevel 7
Badge +3

Hi @vivekm !

You don’t need to call hold button here at all. Acumatica has API adaptor that emulates this buttons when you send Hold = true using API.

So in general you have 2 ways:

  1. I would expect impl.Hold = true.ValueField(); to work in 2021r1 as it was in 2019
  2. Have you tried to use checkbox - Hold Documents on Entry in the Sales order type?

 

Userlevel 4
Badge

Hi @smarenich 

Thank you for the response.

Please find below additional details and suggest:

  1. I would expect impl.Hold = true.ValueField(); to work in 2021r1 as it was in 2019 - “As mentioned initially, somehow this approach is not working for 21R1.”
  2. Have you tried to use checkbox - Hold Documents on Entry in the Sales order type? - “I believe this configuration will set all imported orders on Hold, belongs to that particular order type, and is not our requirement. As per our requirement at the time of order import, we are validating Product Options, as if any Order Product has any Product Option associated to it, such orders only should be kept on Hold, so that user can review those orders and proceed further.”

Please let us know if any further details required from our side for your review.

 

Userlevel 7
Badge +3

Hi @vivekm!

I have checked your problem and I confirm this is a bug in Commerce Connector in 2021. Please submit a support case so we can fix it. You can provide the link to this discussing in the support case to speed up the resolution.

For now you have only one option - Set Hold on Entry in the Sales Order type. If that does not work, you can try to reverse the process, call action to release from hold for non Commerce Orders.

However I think it would be awesome to have a dedicated order type for all the commerce orders.

Userlevel 4
Badge

Hi @smarenich 

Thank you for the details. 

The suggested approach is working fine, will be reaching out to client as if they are fine with this approach.

Additionally have already raised support ticket on Friday 6th and added this discussion link there:

Ticket #: 199170

Subject: BigCommerce 21R1: To Put Acumatica Sales Order on Hold at the time of order Import, based on custom conditions

If possible can you please let us know by when we can get this fixed or will be getting any hot fix for this.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved