Skip to main content
Solved

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


Forum|alt.badge.img

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,

Best answer by gabrielpaz86

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.

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

KarthikGajendran
Acumatica Moderator
Forum|alt.badge.img+3

@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. 


Forum|alt.badge.img

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.


Forum|alt.badge.img

@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);
        }


KarthikGajendran
Acumatica Moderator
Forum|alt.badge.img+3

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


Forum|alt.badge.img

Sure, Thank you @KarthikGajendran.


Forum|alt.badge.img

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.


KarthikGajendran
Acumatica Moderator
Forum|alt.badge.img+3

@dmitriynazarenko36 Could you please take care of it? 


gabrielpaz86
Acumatica Employee
Forum|alt.badge.img+1

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.


Forum|alt.badge.img

Hi @gabrielpaz86 

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


Forum|alt.badge.img

Hello @KarthikGajendran  @gabrielpaz86 

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


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