• Lalit_Rautela
  • 139 Points
  • Member since 2012

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 4
Hi guys I am using Active Widget in Visual Force page. Visual Force page is attached in detail page of custom object.
My active grid not working proper in chrome version 39. means when i am runing my visual force page from detail page active grid not working proper like record not showing proper, check box functionallity etc. If i am running my visual force page without detail page grid working properly.
Any one else facing this type of problem OR any one have some idea about this problem?

I'm creating a customized button. The Query is a nested one as follows:


var primaryContact = sforce.connection.query("SELECT Account.Name, (SELECT Contact.FirstName FROM OpportunityContactRoles) FROM Opportunity WHERE Id='{!Opportunity.Id}'");


The query is a success. But I'm not able to access Contact.FirstName using sforce.QueryResultIterator. The error read: "Can not read property FirstName of undefined". My code is:


if ( primaryContact .size > 0) {
     var it = new sforce.QueryResultIterator(primaryContact );
     while (it.hasNext()) {
               var query = it.next();
               var firstName = query.OpportunityContactRoles.Contact.FirstName;


Please let me know how to access FirstName using the sforce.QueryResultIterator.

difference between "Trigger.New" and "Trigger.old".



I have a visualforce page and a custom controller tied to it.The visualforce page has Account fields of which Account Name field is a required.

Also, i have a cancel button field on my page, when clicked would take the user to account tab.


The issue is, if i do not enter any value in the Account Name field and click cancel, it isn't working and raises a validation error to enter the acocunt name. how can i overcome with this.


Any help is highly appreciated.




<apex:page controller="cancelActions">
    <apex:form >
        <apex:pageBlock title="Account Information">
            <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!acctSave}"/>
                <apex:commandButton value="Cancel" action="{!acctCancel}"/>
            <apex:pageBlockSection columns="1" >
                <apex:inputField value="{!acct.Name}"/>
                <apex:inputField value="{!acct.Type}" />

Apex Controller:


public class cancelActions {


    Public Account acct {get; set;}
    Public PageReference acctSave(){
        return Null;
    Public PageReference acctCancel(){
        PageReference pg=New PageReference('/001/o');
        return pg;





This makes absolutely no sense to me. I am trying to insert two OpportunityLineItems that are exactly the same but I get this exception. What good reason is there to stop the insertion of two Records that are the same?

I understand if this was an upsert operation as you can't insert and update and the same time but I am inserting two brand new OpportuntiyLineItem records.


Message Edited by TehNrd on 09-24-2008 04:48 PM
  • September 24, 2008
  • Like
  • 0