cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Beanshell is giving error while impex import

former_member689399
Discoverer
0 Kudos
370

Hi,

I am trying to set the paymentaddress for the cart which I am populating through impex..I am trying to set the Mainaddress of the b2bunit for which this cart is been created in the value line and I have written a beanshell in impex like :

impex header :

 INSERT_UPDATE Cart; user(uid)[unique = true]; Unit(uid)          ; salesArea(code).......

and beanshell script :

 #% import de.hybris.platform.jalo.order.AbstractOrder;
 #% impex.getLastImportedItem().setDeliveryAddress(((de.hybris.platform.jalo.order.AbstractOrder)impex.getLastImportedItem()).getUnit().getMainAddress());

Error is being shows as

 **Error in method invocation: Method getUnit() not found in class'de.hybris.platform.jalo.order.Cart'**

It is not casting the cart to order where this method exist or is there any other way to get the B2Bunit from the cart?

Accepted Solutions (0)

Answers (0)