-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
1Likes Given
-
14Questions
-
0Replies
-
- puli raju
- May 11, 2016
- Like
- 0
- Continue reading or reply
-
- puli raju
- April 27, 2016
- Like
- 0
- Continue reading or reply
-
- puli raju
- April 26, 2016
- Like
- 0
- Continue reading or reply
-
- puli raju
- April 04, 2016
- Like
- 0
- Continue reading or reply
-
- puli raju
- April 01, 2016
- Like
- 0
- Continue reading or reply
-
- puli raju
- March 30, 2016
- Like
- 0
- Continue reading or reply
-
- puli raju
- March 16, 2016
- Like
- 0
- Continue reading or reply
-
- puli raju
- March 16, 2016
- Like
- 0
- Continue reading or reply
-
- puli raju
- March 15, 2016
- Like
- 0
- Continue reading or reply
-
- puli raju
- March 14, 2016
- Like
- 0
- Continue reading or reply
-
- puli raju
- March 14, 2016
- Like
- 0
- Continue reading or reply
calling PriceBookEntry from Javascript
After reading tons of links, posts and many documents, I decided to ask for help here, hopping some guru can help me with this issue:
<!-- Visualforce Remote object component for Products --> <apex:remoteObjects > <apex:remoteObjectModel name="PriceBookEntry" jsShorthand="Prod" fields="id, Name, Pricebook2Id, UnitPrice, IsActive"> </apex:remoteObjectModel> </apex:remoteObjects>
I have done this javascript fuction to display records from PriceBookEntry Object using remoteObject in Javascript:
function fetchPB(){var wh = new SObjectModel.Prod(); wh.retrieve({ where:{ Pricebook2Id : {eq:'01so0000002r3TBAAY'}, IsActive : {eq:true}, UnitPrice : {gt: 0} }, limit: 5 },function(err, records){ if(err) alert(err.message); else { records.forEach(function(record) { var divCol = $('<div class="row">'); var p = record.get("Pricebook2Id"); alert('row => ' + record.toString()); var detail = $('<p>'+record.get("Name")+'<br/></p>'); var link1 = $('<p><br/><input type="check" name="optCheck"></p> '); link1.click(function(){ $('#inputProduct2').val(record.get("UnitPrice")); }); detail.append(link1); h3.append(detail); divCol.append(product); divCol.appendTo('#prodRow'); }); } }); }
When I execute this function I can see in the developer console of my browser the post action and the data is coming from the server
Even I see the data is coming I can't get the object's values, if I display a javascript alert with the object information I can't see values only this:
I'm prety sure this answer will be not only a big help for me but for the entire SF comunity.
Thanks in Advance.
- Rafael Sanchez 4
- March 16, 2016
- Like
- 1
- Continue reading or reply