Solved

How to Identify Category ExternId Redirection in SyncHistory Screen and Override redirection.

  • 30 October 2023
  • 10 replies
  • 109 views

Userlevel 2
Badge

Hi Team

we have a customisation in place where we wanted to land all the categories to a specific category only so how we can override this redirection.

 

 

Thank you in advance.

Best regards,

icon

Best answer by gabrielpaz86 10 November 2023, 22:29

View original

10 replies

Userlevel 7
Badge +2

@saikrishnav35  Sorry, I do not understand your question. Also. could you please explain the business use case regarding this functionality you want to do? 

Nevertheless, Sync History could not accept duplicate External or Internal IDs. 

Userlevel 2
Badge

Hi @KarthikGajendran 

Thank you for the response, please find the details below:

We have a customization in place where are not syncing Root Category to BigC. In below example we are not syncing the Categories immediate under Company i.e. Test1, Teat2, Test3, Test4.

But the Categories under these root categories ( i.e. Test1, Teat2, Test3, Test4) we are syncing with the same structure to BigC.

Now, when we are clicking on the category external ID on Sync History, it redirects to blank page.

But when we open the same category on BigC, it open. And on comparing both landing urls there is a difference of /products/categories/159/edit (not correct) and products/categories/1/edit/159 (correct).

And due to this reason we are trying to find out a way using we can modify this redirection by updating correct url so it lands to the respective category.

Userlevel 2
Badge

@KarthikGajendran  we find out a method NavigateExtern and override it to but on debug this method is not hitting during redirection.

Sample Code:

 public delegate void NavigateExternDelegate(IConnector connector, ISyncStatus status, ISyncDetail detail);
        [PXOverride()]
        public void NavigateExtern(IConnector connector, ISyncStatus status, ISyncDetail detail, NavigateExternDelegate baseMethod)
        {
            baseMethod(connector, status, detail);
        }

Userlevel 7
Badge +2

@saikrishnav35 Thank you. I will ask our developers from our team to respond to this post. Please give me sometime. 

Userlevel 2
Badge

Sure, Thank you @KarthikGajendran.

Userlevel 2
Badge

Hi @KarthikGajendran 

Did you get any solution on this or did your developers get a chance to review this post. If yes, could you please help me with this.

Thank you In advance.

Userlevel 7
Badge +2

@dmitriynazarenko36 Could you please take care of it? 

Userlevel 2

Hi @saikrishnav35,
If you want to edit the link to the external page, then you can override NavigateExtern of BCConnector graph, but by doing this you will be changing all the redirections from all entities used in the connector. There you should throw a PXRedirectToUrlException with the URL to be redirected.

Just a note, If you call the base method before your logic, then it might not work properly. Also, I suggest you to consider cases where the extern id from status doesn’t exist, as well as base URL.

One more info, unfortunately by design decision, we can’t customize the NavigateExtern from Sync History graph. So, that might explain why your NavigateExtern is never hit.

Userlevel 2
Badge

Hi @gabrielpaz86 

Thanks for your explanation, I will try as you suggested.

Userlevel 2
Badge

Hello @KarthikGajendran  @gabrielpaz86 

Thank you for you suggestion, The issue has been resolved, and everything is working as expected now.

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