You need to sign in to do that
Don't have an account?
Stavros McGillicuddy
Invalid or Unexpected Token error running query
This "should" work by placing everything into one field (Sample_Product_Name_1). but it throws an "Invalid or Unexpected token" error
{!REQUIRESCRIPT("/soap/ajax/32.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/32.0/apex.js")} var record = new sforce.SObject("Opportunity"); record.oli ='{Select Amount,CloseDate,Name, (Select PricebookEntry.Product2Id, TotalPrice, UnitPrice, ListPrice From OpportunityLineItems) From Opportunity}; record.Id = '{!Opportunity.Id}'; record.Sample_Product_Name_1__c= record.oli; sforce.connection.update([record]); window.location.reload();
Try using sforce connnection query.