Thank you Charles for your help.

The problem has been solved, I didn't give much attention with the whole
process that made me stuck with that problem.

But everything is okay right now.

rgds


STELTZLEN Charles wrote:
> 
> Hi Hari,
> 
> Code seems to be ok.
> 
> Sure that the product weight you want is stored in Product ?
> 
> Don't forget to refresh your cache if you have store the product
> weight just before this reading.
> 
> 
> Hari Plaikoil a écrit :
>> Hi All,
>>
>> Would you like to help me, how to fetch value from a variable which its
>> type
>> is GenericValue? 
>> this is my code:
>>
>> GenericValue product = delegator.findByPrimaryKeyCache("Product",
>> UtilMisc.toMap("productId",productId ));
>>
>> I want to get the weight's value by this code:
>>
>> double weight = product.getDouble("weight").doubleValue();
>>
>> but, I don't have any value store in weight's variable.
>>
>> I don't know what mistakes I've done. Please help me.
>>
>>
>> Thank you
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/cannot-get-value-from-findByPrimaryCache-tp20674090p20744589.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to