Hello Mallah, As you want to update product price then all primary key (productId, fromDate, currencyUomId, productPricePurposeId, productPriceTypeId and productStoreGroupId) of ProductPrice should be matched (A ProductPrice record should exist with all matching primary key you passed). lookedUpValue will always be null at Line 64 if any primary key of ProductPrice not matched.
Thanks and Regards -- Akash Jain On Mon, Apr 16, 2018 at 11:42 PM, Rajesh Mallah <mallah.raj...@gmail.com> wrote: > Hi , > > I am calling > > https://demo-stable.ofbiz.apache.org/webtools/control/Servic > eList?sel_service_name=updateProductPrice > > with ARGS > > { > currencyUomId "INR", > fromDate "2018-04-16 17:39:52", > price 150, > productId "PROD_SW52D5H3EN", > productPricePurposeId "PURCHASE", > productPriceTypeId "DEFAULT_PRICE", > productStoreGroupId "_NA_", > taxInPrice "Y", > termUomId "WT_kg" > } > > > I am getting error: > > > faultString:Error running the simple-method: Entity value not found with > name: lookedUpValue Method = updateProductPrice, File = > file:/opt/ofbiz/apache-ofbiz-16.11.04/applications/product/m > inilang/product/price/PriceServices.xml, > Element = <set-nonpk-fields>, Line 69null > > > the minilang def is reproduced here for convinience: > > <simple-method method-name="updateProductPrice" short-description="Update > an ProductPrice"> > <set field="callingMethodName" value="updateProductPrice"/> > <set field="checkAction" value="UPDATE"/> > <call-simple-method method-name="checkProductRelatedPermission" > xml-resource="component://product/minilang/product/product/ > ProductServices.xml"/> > <check-permission permission="CATALOG_PRICE_MAINT"> > <fail-property resource="ProductUiLabels" > property="ProductPriceMaintPermissionError"/> > </check-permission> > <check-errors/> > > <call-simple-method method-name="inlineHandlePrice > WithTaxIncluded"/> > > <entity-one entity-name="ProductPrice" > value-field="lookedUpValue"/> > > <!-- grab the old price value before setting nonpk parameter fields > --> > <field-to-result field="lookedUpValue.price" > result-name="oldPrice"/> > > <set-nonpk-fields map="parameters" value-field="lookedUpValue"/> > > <now-timestamp field="nowTimestamp"/> > <set field="lookedUpValue.lastModifiedDate" > from-field="nowTimestamp"/> > <set field="lookedUpValue.lastModifiedByUserLogin" > from-field="userLogin.userLoginId"/> > > <store-value value-field="lookedUpValue"/> > </simple-method> > > The productID does exists in Entity ProductPrice > Where am I going wrong ? > > thanks & regds > Rajesh Mallah. >