You need to sign in to do that
Don't have an account?
Traci Whetzel 8
Error: Invalid field Customer_Standard_Price_Sales__c for SObject OpportunityLineItem
I would like to know how I reference a custom field as part of this visual force page for Opportunity Line Items. The template is from this app, on the Appexchange form Salesforce labs: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N300000016cYlEAI&modal=where_to_install_package
The error states that it is an invalid field, but it's a custom field on the product.
Any help would be appreciated!
The error states that it is an invalid field, but it's a custom field on the product.
Any help would be appreciated!
I think that field name is different that you are using Customer_Standard_Price_Sales__c , in the attached screenshot it is showing Customer_Standard_Price__c as field name
Hope this helps :)
All Answers
Please try with below line.
opp.product2.Customer_standard_price_sales__c
Hope this helps.
Raj - this did not work either.
Did you created this field on opportunityLineItem ?
Could you please double check?
It may happen that you may have accidentally created it on opportunity you might be looking the field in opportunitylineitem.
it is working fine in my scenario.
If that is not the case , please put the screenshot of custom fields and relationship , that will help us to dig into this problem.
I think that field name is different that you are using Customer_Standard_Price_Sales__c , in the attached screenshot it is showing Customer_Standard_Price__c as field name
Hope this helps :)
I have the same issue. I follow all the steps recommended by you but it does not work. Does anyone find a solution? Please kindly share and I really appreciate it. Thanks in advance!
Visualforce code:
<apex:page standardController="Filleul__c">
<head>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyASUR_G8o_HDm77OEnVbaw2logXemdjt18&callback=initMap" ></script>
<script type="text/javascript">
$(document).ready(function() {
var myOptions = {
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false
}
var map;
var latlng = new google.maps.LatLng(parseFloat({!Filleul__c.Latitude__c}),parseFloat({!Filleul__c.Longitude__c}));
var geocoder = new google.maps.Geocoder();
geocoder.geocode( { location: latlng}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK && results.length) {
if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {
//create map
map = new google.maps.Map(document.getElementById("map"), myOptions);
//center map
map.setCenter(results[0].geometry.location);
//var marker = new GMarker(center, {draggable: true});
//create marker
marker = new google.maps.Marker({
position: results[0].geometry.location,
map: map,
title: "{!Filleul__c.Name}",
draggable: true
});
//add listeners
GEvent.addListener(marker, "dragstart", function() {
map.closeInfoWindow();
});
GEvent.addListener(marker, "dragend", function() {
marker.openInfoWindowHtml("");
});
map.addOverlay(marker);
}
} else {
$('#map').css({'height' : '15px'});
$('#map').html("Les latitude et longitude pour le filleul {!Filleul__c.Name} ne sont pas valides.");
resizeIframe();
}
});
function resizeIframe() {
var me = window.name;
if (me) {
var iframes = parent.document.getElementsByName(me);
if (iframes && iframes.length == 1) {
height = document.body.offsetHeight;
iframes[0].style.height = height + "px";
}
}
}
});
</script>
<style>
#map {
font-family: Arial;
font-size:12px;
line-height:normal !important;
height:250px;
background:transparent;
}
</style>
</head>
<body>
<div id="map"></div>
</body>
</apex:page>