Calculator__c objCalculator = [Select id, name, (select id,
fee_amount__c, cost_Amount__c, Type__c, from
Non_Labor_Cost_Details__r) From Calculator__c p where id =: PId];
When I try to use this object in Javascript like this:
{!objPricingCalculator.Non_Labor_Cost_Details__r}
It returns only list of Ids (comma separated). It's not returning
fee_amount__c
, cost_Amount__c
and Type__c
values.
Is there any way through which I can also extract fee_amount__c
, cost_Amount__c
and Type__c
along with Id
.
I don't want to use Javascript Remoting as I will have to change code flow for this.
Best Answer
//Apex class
Visualforce code with Javascript
This is the starting point.Now you can declare your own function in javascript something like this in script
After this you can use push function of javascript to form an object array using some samples from below URL.
http://www.w3schools.com/jsref/jsref_push.asp