on 2017 Aug 22 3:30 AM
Hi,
We have a requirement where B2BUnit and B2B customer details will be captured through Hybris storefront and will be passed to SAP CRM. If the customer and contact person created successfully in CRM then the same has to be created/stored in Hybris as B2BUnit and B2BCustomer. When we are trying to save the B2BUnit details we are getting the error "Only member of an 'admingroup' can create a top level Organization". I think we need to make sure to avoid executing the below logic.
if (ctx.getModelService().isNew(model) && this.getB2bUnitService().getParent(unit) == null && !this.getUserService().isMemberOfGroup(this.getUserService().getCurrentUser(), this.getUserService().getAdminUserGroup())) { throw new InterceptorException( this.getL10NService().getLocalizedString("error.b2bunit.root.create.nonadmin")); }.
Can you please help us in overriding this or any other possible solution to avoid this error programatically?
Thanks and Regards, Sumanth
Request clarification before answering.
Hi,
You have to replace the 'B2BUnitModelValidateInterceptor' which is OOTB interceptor. Please follow replace interceptor steps in wiki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.