cancel
Showing results for 
Search instead for 
Did you mean: 

B2BUnit Model retrieved from b2bUnitService despite the B2BUnit present?

100406161994
Explorer
0 Kudos

b2bUnitService.getUnitForUid(uid) returns NULL value, however using flexi query the Unit can be seen in the result. Any ideas why ?

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi, Did you find any solution of this? I can also see this null error for valid uid, at code-line:

final B2BUnitModel unitForUid = getCompanyB2BCommerceService().getUnitForUid(uid);

Is it Bug, or some permission issue with the user ?

bhavirisetty
Active Participant
0 Kudos

Is there any personalization rule agianst B2BUnit ? Please check in backoffice/hmc?

Former Member
0 Kudos

b2bUnitService.getUnitForUid(uid) calls

UserService

to get the b2bUnit.
Have, you overridden UserService ?
More info at DefaultB2BUnitService (you will need a Decomiler to check this class) :

 unit = (B2BUnitModel)getUserService().getUserGroupForUID(uid, de/hybris/platform/b2b/model/B2BUnitModel);
Former Member
0 Kudos

if the uid passed to get the business unit is not available then it will return null. You may be check that if you still have the issue please elaborate your question in detail