Skip to main content

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,

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


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.


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


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


Sure, Thank you @KarthikGajendran.


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.


@dmitriynazarenko36 Could you please take care of it? 


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.


Hi @gabrielpaz86 

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


Hello @KarthikGajendran  @gabrielpaz86 

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


Reply