Dynamics GP eConnect taIVCreateItemPriceListHeader & item pricing defaults in IV00101

It should be noted that creating/updating a price list header record using eConnect updates the following item card default field values;
  • Price level,
  • Pricing method
  • Price group
  • Default selling unit of measure

These fields are reflected in the GP GUI here:

taIVCreateItemPriceListHeader shown in Dynamics GP GUI

The taIVCreateItemPriceListHeader is not the clear name for this when you go looking for it, if like me you know it lives in the item table, but naming is one of those subjective and difficult matters developers struggle with.
 
When using eConnect to create/update the price list header, if no price level is passed to eConnect, then eConnect will look at the item master to get a value (aka table IV00101). If none has been defined then error occurs.
If a value is passed in through eConnect, then those values for these fields will always over write the values in the Item Master (IV00101).
 
Here is the SQL fetching the price level…
IF (@I_vPRCLEVEL IS NULL)
BEGIN
SELECT
@I_vPRCLEVEL = PRCLEVEL
FROM IV00101(nolock)
WHERE ITEMNMBR = @I_vITEMNMBR
END

That price level is then much later on used to update the item master table IV00101, this is similar to the way the other fields work too.
There is no condition on running this update, IV00101 will always be updated with existing values or passed in values. This is the only update that occurs from using this eConnect method, note that the item record needs to exist already.
UPDATE IV00101
SET PRICMTHD = @I_vPRICMTHD,
PRCLEVEL = @I_vPRCLEVEL,
PriceGroup = @I_vPriceGroup,
SELNGUOM = @I_vUOFM
WHERE ITEMNMBR = @I_vITEMNMBR

This is a little confusing as thinking from a SQL table perspective, you would have expected the default price level to be part of the item create/update eConnect method. Instead it follows the GUI where default price level is part of price list editing rather than item maintenance.

Add comment

Loading