on 05-22-2019 3:09 PM
We have a requirement in punchout.
Punchout system will send a request to hybris in the form of CXML. In header part of the CXML contains punchoutCredential. We have to authenticate the credential in hybris whether credential is valid Credential or not.
In one scenario if the credential is not available in hybris,we need to create PunchoutCredential on the fly and need to do authentication.
Immediately after saving punchoutcredential I'm trying to fetch the same for authentication. I can able to fetch the punchoutCredentialModel but inside that some attributes are coming as null.But those values are there in DB,I have checked via HMC.
Can you please suggest Why those attribute values are coming null and How to resolve it?
Hi - please try calling ModelService.refresh(punchoutCredentialModel)
before fetching the punchoutCredentialModel
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi - Thanks for your Suggestion...
Now it was resolved,
PunchoutCredential
B2BCustomerPunchOutCredentialMapping
B2BCustomer
PunchoutCredential and B2BCustomerPunchOutCredentialMapping is many to one relation. B2BCustomerPunchOutCredentialMapping contains B2BCustomer.
I have created new PunchoutCredential,B2BCustomerPunchOutCredentialMapping & B2BCustomer
Initially I have mapped like below.
B2BCustomerPunchOutCredentialMappingModel mappingModel = modelService
.create(B2BCustomerPunchOutCredentialMappingModel.class);
mappingModel.setCredentials(punchOutCredentialSet);
mappingModel.setB2bCustomer(b2bCustomerModel);
Later I have changed like below and it was working fine
B2BCustomerPunchOutCredentialMappingModel mappingModel = modelService
.create(B2BCustomerPunchOutCredentialMappingModel.class);
mappingModel.setCredentials(punchOutCredentialSet);
punchOutCredential.setB2BCustomerPunchOutCredentialMapping(mappingModel);
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.