Skip to Content
0
Former Member
Jul 04, 2007 at 04:45 PM

Changes in extension data not always sent to CRM Backend

156 Views

Hi,

In a CRM 5.0 ISA b2b scenario we run into a problem:

<b>Short description:</b>

Changes in extension data on basket item level are only sent to the backend if there are additional changes to that item (for example a change in quantity).

<b>Long description:</b>

We have added an extension field on basket item level and use the standard extension mechanism to exchange this data to the CRM backend. In order to do this we have done the following:

- On the Java side we implemented MaintainBasketDispatcherAction and ShowBasketAction. The overridden methods are parseRequest() (from MaintainBasketDispatcherAction) and isaPerform() (from ShowBasketAction).

- In the backend we implemented the BADI CRM_ISA_BASKET_ITEMS and implemented the methods CHANGEITEMS_SET_DATA, CLEAR, GETITEMS_GET_DATA and SAVE.

We experience a problem when creating an order: When the only thing that changes in an item is our custom field, this is not noticed by the webshop as a change in the item. Therefore the method CHANGEITEMS_SET_DATA isn't called and the extension data isn't updated. If we change another field of an item, for example the quantity, the change is picked up and the method CHANGEITEMS_SET_DATA is being called.

It seems that somewhere an optimization is taking place where the Webshop decides that unchanged lines should not be sent to the backend. I can't find a way to tell the webshop that the lines are modified (i.e. are dirty).

Has anyone experienced similar behaviour or does anyone know of a solution?

Thanks in advance.

Wilco Menge

Java snippet:

parseRequest():

ItemList itemList = preOrderSalesDocument.getItems();
String extensionData = "";

if (itemList!=null && itemList.size()>0)
{
	for (int i=0;i<itemList.size();i++)
	{	
		if (itemList.get(i)!=null);
		{
			extensionData = parser.getParameter("z_extension_data").getValue().getString(); 
			
			itemList.get(i).addExtensionData("ZEXTENSION", extensionData); 
		}			
	}

}