• Mike_M_2
  • NEWBIE
  • 74 Points
  • Member since 2012
  • Jambi Tool Administrator
  • Quinstreet

  • Chatter
    Feed
  • 2
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 32
    Questions
  • 46
    Replies

Hi All,

 

I m getting below error while updating Opportunity.

 

System.QueryException: null: 

 

When i query in debug log its works fine, but when i run the Query in class is gives me above exception.

 

Select SplitPercentage, SplitOwnerId, SplitNote, SplitAmount, OpportunityId, Id From OpportunitySplit where OpportunityId!=null and OpportunityId IN('006Z0000007XSSDSSD') limit 50000

 

So any one has any idea where i am going wrong.

 

Thanks

Shailu

 

  • October 01, 2013
  • Like
  • 0
How can I create the equivalent of a Workflow  plus Email Action without Workflows. We are at our Workflow limit and becides that, we would like to use a newer technology. I was thinking something like Flow builder, but figured I'd ask which tool would work best for this. 
Thanks,'
Mike
 
I'm using Bulk API 2 to load a custom table/object named ExternalStaging. This part is working fine. After the records are loaded into ExternalStaging, I want to read each record and upsert an Opportunity based on the data. What tool is best to use for this? Process Builder? Visual Flow? Trigger? scheduled APEX? 
Our standard 'New Opportunity' button is overriden to invoke a visualforce page. Can I create a different 'New Opportunity' button for use only on the Account screen's Opportunity Related List which does NOT invoke that invoke that same visualforce page. 
Button intended for Account Screen's Opportunity Related ListThe above imiage shows a button which is intended for the Opportunity Related List on the Account screen. I have successfully place this button there. The problem is that when I click on the button the visualforce page defined on the standard New opportunity button still gets launched. 
Here is the overridden Stanard New Opportunity button.
Shows Standard Button is overriden with VF pageShows how Standard New button is defined with override VFSo, again, even though New2 button is on the related list, the "OpportunityCreate" visualforce page is still invoked. 
Hopefull this is clear., 
thanks
 
Posting now to General Development because no answer on APEX Code Development. 

We had a 3rd party do a customization for us. They overrode the New Opportunity button with a button that invokes a visualforce page. The controller for this VF page marshalls the data and then creates an opportunity. The problem is when the user clicks the NEW Opportunity button from an Account screen. The Account Name is not autopopulated to the Opportunity.Is there any way to Access the Account Name within the controller for this VF page? 

Thanks 

We had a 3rd party do a customization for us. They overrode the New Opportunity button with a button that invokes a visualforce page. The controller for this VF page marshalls the data and then creates an opportunity. The problem is when the user clicks the NEW Opportunity button from an Account screen. The Account Name is not autopopulated to the Opportunity.Is there any way to Access the Account Name within the controller for this page? This is the first line of that controller just to show that it does not extend the opportunity controller. 

public class OpportunityCreate extends BaseController {

BaseController is virtual.

Thanks 

It's very simple. I need my visualforce page to pass a string literal constant to my controller extension. 
The VF page ...
<apex:page standardController="Opportunity" extensions="OpportunityActualList"  sidebar="false" showHeader="false">

    <apex:form >
        <apex:pageBlock >
            <apex:param name="val" value="abc" />
        </apex:pageBlock>
    </apex:form>
 
</apex:page>

The controller...
public class OpportunityActualList {
public string passValue{get; set;}
    
    public OpportunityActualList(ApexPages.StandardController controller){
    passValue = Apexpages.currentPage().getparameters().get('val');      
    system.debug('passValue:' + passValue);
    }   
}

The debug log shows the value is null.
 
I have a custom object (Revenue_Amount__c) that is the child on a master-detail relationship with Opportunity. 
My goal is to have the ability to modify data on the Revenue_Amount__c without leaving the Opportunity screen. 
To this end I have created a Visualforce page and an Apex class.
The VF:
<apex:page standardController="Opportunity" extensions="OpportunityActualList"  sidebar="false" showHeader="false">
    <apex:form >
        <apex:pageBlock >
        
            <apex:pageMessages />

            <apex:pageBlockButtons >
                <apex:commandButton value="QuickSave" action="{!quicksave}"/>
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
            <input id="theHiddenInput" type="hidden" name="{!Opportunity.Name}" />
            
            <apex:outputPanel layout="block" style="overflow:auto;width:600px;height:606px" >
              <apex:pageBlockTable value="{!amounts}" var="x" id="list">
                                
                <apex:column headerValue="Id">
                    <apex:inputField value="{!x.Id}"/>
                </apex:column>
                
                <apex:column headerValue="Type">
                    <apex:inputField value="{!x.Type__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Date">
                    <apex:inputField value="{!x.Fiscal_Date__c}"/>
                </apex:column>
                
                <apex:column headerValue="Amount">
                    <apex:inputField value="{!x.Dollar_Amount__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Show">
                    <apex:inputField value="{!x.Show_On_Report__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Opp">
                    <apex:inputField value="{!x.Name}"/>
                </apex:column>


              </apex:pageBlockTable> 

            </apex:OutputPanel> 
        </apex:pageBlock>
    </apex:form>
</apex:page>
Opportunity Controller extension
 
public class OpportunityActualList {

    private final Opportunity opp;

    public OpportunityActualList(ApexPages.StandardController stdController) {
        this.opp = (Opportunity)stdController.getRecord();
    }

    public ApexPages.StandardSetController setCon {
        get {
            if(setCon == null) {

                setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
                    [SELECT id, MonthlyRevenueAmounts__r.name , Dollar_Amount__c, type__c, Fiscal_Date__c, Show_On_Report__c, Revenue_Amount__c.Name
                       FROM Revenue_Amount__c
                   WHERE MonthlyRevenueAmounts__r.name = :opp.Name
                   and  Show_On_Report__c = 'SHOW'
                   and  Type__c = 'Actual'
                   order by Fiscal_Date__c desc ]));
            }
            return setCon;
        }
        set;
    }

    public List<Revenue_Amount__c> getAmounts() {
        return (List<Revenue_Amount__c>) setCon.getRecords();
    }
}
Opportunity screen image. In reality I only need the Date and Amount column.
User-added imageWhen I change an amount and then click on QuickSave, the panel (shown above) refreshes and the new amount value is shown. The behaviour is like you would expect when you do an update. But, when you view the actual Revenue_Amount__c record, the old value is still there.   

the log
46.0 APEX_CODE,DEBUG;APEX_PROFILING,NONE;CALLOUT,NONE;DB,INFO;NBA,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,NONE
11:08:17.0 (455361)|USER_INFO|[EXTERNAL]|00580000003ZDZy|mmoore@quinstreet.com.mike|(GMT-07:00) Pacific Daylight Time (America/Los_Angeles)|GMT-07:00
11:08:17.0 (497720)|EXECUTION_STARTED
11:08:17.0 (503871)|CODE_UNIT_STARTED|[EXTERNAL]|066220000000ReR|VF: /apex/Opportunity_YoY_Actuals
11:08:17.0 (1228336)|VF_DESERIALIZE_VIEWSTATE_BEGIN|066220000000ReR
11:08:17.0 (8968923)|VF_DESERIALIZE_VIEWSTATE_END
11:08:17.9 (9763059)|SYSTEM_MODE_ENTER|true
11:08:17.10 (10437964)|SYSTEM_MODE_ENTER|true
11:08:17.0 (10999702)|SYSTEM_MODE_ENTER|true
11:08:17.77 (77859418)|SYSTEM_MODE_ENTER|true
11:08:17.0 (85970297)|CODE_UNIT_STARTED|[EXTERNAL]|VF Controller Save
11:08:17.0 (85991440)|SYSTEM_MODE_ENTER|false
11:08:17.0 (134521244)|CODE_UNIT_STARTED|[EXTERNAL]|Validation:Opportunity:00622000002jJP3
11:08:17.0 (134542832)|VALIDATION_RULE|03d80000000PY2P|B2B_Campaign_Objectives_Required
11:08:17.0 (134842407)|VALIDATION_FORMULA|Probability >= 0.5 &&
RecordTypeId = '01280000000BpSv' &&
isPickVal (Campaign_Objectives__c ,'--None--'   )|RecordTypeId=01280000000Hqet , Campaign_Objectives__c=null , Probability=10.0
11:08:17.0 (134851463)|VALIDATION_PASS
11:08:17.0 (134854689)|VALIDATION_RULE|03d80000000PY2F|B2B_Enhancements_Additions_Required
11:08:17.0 (134952606)|VALIDATION_FORMULA|Probability >= 0.50  &&
RecordTypeId = '01280000000BpSv' &&
isBlank ( Enhancements_Additions__c )|Enhancements_Additions__c=null , RecordTypeId=01280000000Hqet , Probability=10.0
11:08:17.0 (134958799)|VALIDATION_PASS
11:08:17.0 (134961891)|VALIDATION_RULE|03d800000006Txv|B2B_MustBeNotNullWhenAccountIsAgency
11:08:17.0 (135194241)|VALIDATION_FORMULA|NOT(ISPICKVAL(Account.Originating_System__c, 'ITBE'))
&&
ISPICKVAL(Category__c, 'Business to Business') 
&& 
LEN(Client_Name__c) = 0
&& 
ISPICKVAL(Account.Type, 'Agency')|Account.Type=null , Client_Name__c=null , Category__c=null , Account.Originating_System__c=<Not Migrated>
11:08:17.0 (135205236)|VALIDATION_PASS
11:08:17.0 (135208369)|VALIDATION_RULE|03d800000006Txq|B2B_MustBeNullWhenAccountIsClient
11:08:17.0 (135401165)|VALIDATION_FORMULA|NOT(ISPICKVAL(Account.Originating_System__c, 'ITBE'))
&&
ISPICKVAL(Category__c, 'Business to Business')
&&
LEN(Client_Name__c) > 0
&&
ISPICKVAL(Account.Type, 'Client')|Account.Type=null , Client_Name__c=null , Category__c=null , Account.Originating_System__c=<Not Migrated>
11:08:17.0 (135413060)|VALIDATION_PASS
11:08:17.0 (135416218)|VALIDATION_RULE|03d80000000PY2K|B2B_Topic_Segment_Required
11:08:17.0 (135544996)|VALIDATION_FORMULA|and(
Probability >= 0.50 ,
RecordTypeId = '01280000000BpSv',
or (isBlank (Topic_Segment__c),isNull(Topic_Segment__c) )
)|RecordTypeId=01280000000Hqet , Probability=10.0 , Topic_Segment__c=null
11:08:17.0 (135552711)|VALIDATION_PASS
11:08:17.0 (135555512)|VALIDATION_RULE|03d80000000Tidg|Check_CompanyId_Value
11:08:17.0 (135653731)|VALIDATION_FORMULA|AND(
	(LID__LinkedIn_Company_Id__c <> NULL),
	NOT(ISNUMBER(LID__LinkedIn_Company_Id__c))
)|LID__LinkedIn_Company_Id__c=null
11:08:17.0 (135661258)|VALIDATION_PASS
11:08:17.0 (135664131)|VALIDATION_RULE|03d80000000TfFC|CSD_user_Stage_restriction
11:08:17.0 (137741521)|VALIDATION_FORMULA|( ISPICKVAL( StageName , 'Close Within (1) Week')  &#124;&#124; ISPICKVAL(StageName, 'Closed Won') )  &&  $UserRole.Name  = 'B2B Tech Rep' &&  ISCHANGED( StageName )|StageName=Advanced Negotiations , $UserRole.Name=System Admin
11:08:17.0 (137756366)|VALIDATION_PASS
11:08:17.0 (137759931)|VALIDATION_RULE|03d80000000LHtS|EDU_Product_Month_is_Day_1_of_Month
11:08:17.0 (137871970)|VALIDATION_FORMULA|DAY(EDU_Product_Month__c)  <>  1|EDU_Product_Month__c=2019-05-01 00:00:00
11:08:17.0 (137885584)|VALIDATION_PASS
11:08:17.0 (137888747)|VALIDATION_RULE|03d80000000Thle|no_change_account_after_platform_push
11:08:17.0 (138000798)|VALIDATION_FORMULA|PRIORVALUE(  AccountId  ) <> AccountId
&&
  billing_io_key__c   <>   NULL|AccountId=0012200000IrAZe , billing_io_key__c=null
11:08:17.0 (138007160)|VALIDATION_PASS
11:08:17.0 (138009936)|VALIDATION_RULE|03d80000000TXwy|no_change_system_IO_number
11:08:17.0 (138101947)|VALIDATION_FORMULA|PRIORVALUE( I_O__c ) = AutoIO__c
&&
 I_O__c != AutoIO__c|AutoIO__c=234955 , I_O__c=234955
11:08:17.0 (138107478)|VALIDATION_PASS
11:08:17.0 (138110350)|VALIDATION_RULE|03d80000000TZ79|Rep_no_change_total_after_contract_sent
11:08:17.0 (138269689)|VALIDATION_FORMULA|ISCHANGED(Opportunity_Total__c ) && 
$UserRole.Name = 'B2B Tech Rep' &&     
(
ISPICKVAL(StageName , 'Contract Sent') &#124;&#124;
ISPICKVAL(StageName , 'Close Within (1) Week') &#124;&#124;
ISPICKVAL(StageName , 'Closed Won') &#124;&#124;
ISPICKVAL(StageName , 'Closed Lost') &#124;&#124;
ISPICKVAL(StageName , 'Void/Cancel')
)|StageName=Advanced Negotiations , $UserRole.Name=System Admin , Opportunity_Total__c=null
11:08:17.0 (138279929)|VALIDATION_PASS
11:08:17.0 (138282683)|VALIDATION_RULE|03d80000000TUZK|ValueInPickList
11:08:17.0 (138419726)|VALIDATION_FORMULA|NOT(CONTAINS("Business to Business:Careers:Education:Financial Services:Home Services:Medical and Health:Travel:Advertising", TEXT(Category__c)))|Category__c=null
11:08:17.0 (138427087)|VALIDATION_PASS
11:08:17.0 (138429779)|VALIDATION_RULE|03d80000000Tc5i|B2BTech_Closed_Lost_Description_Required
11:08:17.0 (138598236)|VALIDATION_FORMULA|AND( ISPICKVAL(Account.Sub_category__c,'Business to Business - Tech'),
 Closed_Lost_Description__c ='',  OR(ISPICKVAL(StageName, 'Closed Lost')) )|Closed_Lost_Description__c=null , StageName=Advanced Negotiations , Account.Sub_category__c=null
11:08:17.0 (138606373)|VALIDATION_PASS
11:08:17.0 (138609219)|VALIDATION_RULE|03d80000000Tc5Y|B2BTech_Reason_Lost_Required
11:08:17.0 (138783050)|VALIDATION_FORMULA|AND( ISPICKVAL(Account.Sub_category__c,'Business to Business - Tech'),
 ISPICKVAL(Reason_Lost__c,''),  OR(ISPICKVAL(StageName, 'Closed Lost'),ISPICKVAL(StageName,'Void/Cancel')) )|Reason_Lost__c=null , StageName=Advanced Negotiations , Account.Sub_category__c=null
11:08:17.0 (138793120)|VALIDATION_PASS
11:08:17.0 (138797149)|VALIDATION_RULE|03d80000000TUci|Deal_Type_Total
11:08:17.0 (139156264)|VALIDATION_FORMULA|AND
(  Probability >= 0.50,
   RecordTypeId != '01280000000QEuM',
   RecordTypeId != '01280000000Bp05',
   RecordTypeId != '01280000000Bp03',
   RecordTypeId != '01280000000Bp06',
   RecordTypeId != '01280000000Bp07',
   RecordType.Name != 'EDU_BUDGET',
   ISPICKVAL (Account.Sub_category__c , 'Business to Business - Tech'),
   NOT(ISPICKVAL(Account.Originating_System__c, 'ITBE')),
   (
      NULLVALUE(Deal_Type_Click__c, 0) +
      NULLVALUE(Deal_Type_CPA__c, 0) +
      NULLVALUE(Deal_Type_Display__c, 0) +
      NULLVALUE(Deal_Type_eSeminar_percent__c, 0) +
      NULLVALUE(Deal_Type_other_percent__c, 0) +
      NULLVALUE(Deal_Type_Lead__c, 0)
   ) != 1
)|Deal_Type_CPA__c=null , Deal_Type_other_percent__c=null , RecordTypeId=01280000000Hqet , Deal_Type_Display__c=null , Probability=10.0 , Account.Originating_System__c=<Not Migrated> , RecordType.Name=EDU Budget , Deal_Type_Lead__c=null , Deal_Type_Click__c=null , Account.Sub_category__c=null , Deal_Type_eSeminar_percent__c=null
11:08:17.0 (139178030)|VALIDATION_PASS
11:08:17.0 (139180862)|VALIDATION_RULE|03d80000000TdkB|InvoiceNotesMax240Chars
11:08:17.0 (139246906)|VALIDATION_FORMULA|LEN(Invoice_Notes__c)  > 240|Invoice_Notes__c=null
11:08:17.0 (139252236)|VALIDATION_PASS
11:08:17.0 (139254856)|VALIDATION_RULE|03d80000000Aptd|StageNameIsNotNone
11:08:17.0 (139300766)|VALIDATION_FORMULA|ISPICKVAL(StageName , '--None--')|StageName=Advanced Negotiations
11:08:17.0 (139305707)|VALIDATION_PASS
11:08:17.0 (139313558)|CODE_UNIT_FINISHED|Validation:Opportunity:00622000002jJP3
11:08:17.0 (200133293)|CODE_UNIT_STARTED|[EXTERNAL]|Workflow:Opportunity
11:08:17.0 (227360016)|CODE_UNIT_FINISHED|Workflow:Opportunity
11:08:17.0 (238675011)|CODE_UNIT_FINISHED|VF Controller Save
11:08:17.241 (241425173)|SYSTEM_MODE_ENTER|true
11:08:17.241 (241638407)|SYSTEM_MODE_ENTER|true
11:08:17.0 (242121504)|SYSTEM_MODE_ENTER|true
11:08:17.269 (269720864)|SYSTEM_MODE_ENTER|true
11:08:17.269 (269929739)|SYSTEM_MODE_ENTER|true
11:08:17.0 (339122653)|VF_SERIALIZE_VIEWSTATE_BEGIN|066220000000ReR
11:08:17.0 (342512976)|VF_SERIALIZE_VIEWSTATE_END
11:08:17.0 (346352402)|CODE_UNIT_FINISHED|VF: /apex/Opportunity_YoY_Actuals
11:08:17.0 (347540377)|EXECUTION_FINISHED

 
I've read everything I can on this error (subject line) but I think I AM querying the request field, so I need help. I have a custom object as the detail side of a Master-Detail relationship with Opportunity as the parent. II'm building a very simple Visualforce page which is placed on the Opportunity screen.
<apex:page standardController="Opportunity" extensions="opportunityListYoY"  sidebar="false" showHeader="false">
    <apex:form >
        <apex:pageBlock >
            <apex:pageMessages />
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!quicksave}"/>
            </apex:pageBlockButtons>
            
            <apex:pageBlockTable value="{!amounts}" var="x" id="list">
            
                <apex:column headerValue="Type">
                    <apex:inputField value="{!x.type__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Opp">
                    <apex:inputField value="{!x.MonthlyRevenueAmounts__r.name}"/>
                </apex:column>
                
                <apex:column headerValue="Amount">
                    <apex:inputField value="{!x.Dollar_Amount__c}"/>
                </apex:column>

            </apex:pageBlockTable> 
        </apex:pageBlock>
    </apex:form>
</apex:page>
The controller extension is:
public class opportunityListYoY {

    private final Opportunity opp;

    public opportunityListYoY(ApexPages.StandardController stdController) {
        this.opp = (Opportunity)stdController.getRecord();
    }

    public ApexPages.StandardSetController setCon {
        get {
            if(setCon == null) {
                setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
                    [SELECT MonthlyRevenueAmounts__r.name , Dollar_Amount__c, type__c, Fiscal_Date__c, Show_On_Report__c 
                       FROM Revenue_Amount__c
                //    WHERE MonthlyRevenueAmounts__r.name = 'Mikes Opp'  ]));  <--- THIS LINE WORKS FINE
                      WHERE MonthlyRevenueAmounts__r.name = :opp.Name  ]));  <-- this line rasises the error
                    
            }
            return setCon;
        }
        set;
    }

    public List<Revenue_Amount__c> getAmounts() {
        return (List<Revenue_Amount__c>) setCon.getRecords();
    }
}
TIA,
Mike

 
I am able to launch my Flow is a SLDS modal but when I click on the Flow's NEXT button, the entire VF page is re-rendered. How can I make the NEXT button function properly?
// Mike Modal methods
        function openModal2() {
        console.log('running openModal2');
            j$("#modalWizDiv").addClass('slds-modal--large');
            j$("#modalWizDiv").addClass('slds-fade-in-open');
            j$("#modalWizDivBackDrop").addClass('slds-backdrop--open');
            j$("#modalWizLoading").addClass('slds-hide');
            j$(".modalWizSubmit").click(function(event) {
            console.log('running in event')
            closeWizModal();
            });
 
<!-- New Account Wizard Modal -->
        <div>
            <div id="modalWizDiv" aria-hidden="false" role="dialog" class="slds-modal">
            
                <div id="modalWizLoading" style="transition:opacity 0.4s linear;z-index:99999; opacity:1; width:100%; height:100%; position:fixed;right:0;bottom:0;left:0;background:rgba(255,255,255,0.85);">
                    <div class="slds-spinner--large" style="position:fixed; top:30%; left:45%;">
                        <img src="{!$Resource.SLDS203}/assets/images/spinners/slds_spinner_brand.gif" alt="Loading..." />
                    </div>
                </div>
                
                <div class="slds-modal__container">
                    <div class="slds-modal__header">
                        <h2 class="slds-text-heading--medium">New Account</h2>
                    </div>
                    <!-- Modal Content -->
                    <div class="slds-modal__content slds-p-around--medium">
                        <!-- Error Message -->
                        <div class="modalWizPageMessages slds-box slds-theme--error slds-m-bottom--large slds-hide">
                          <p>Some Random
                            <strong>text</strong>.</p>
                        </div>
                        <!-- / Error Message -->
                        <div class="slds-align--absolute-center">

                            <fieldset class="slds-form-element is-required">
                                <div class="slds-float--left">
                                    <legend class="slds-form-element__legend slds-form-element__label">Select a Legend</legend>
                                </div>
                                
                                <div id="wizardContainer" class="slds-form-element__control slds-float--left slds-m-right--xx-large slds-p-right--xx-large">
                                   <flow:interview name="New_Account_Wizard"></flow:interview>
                                </div>

                                <div class="slds-clearfix"></div>
                            </fieldset>

                        </div>
                    </div>
                    <!-- / Modal Content -->                           
                        <div class="slds-modal__footer">
                        <div class="slds-x-small-buttons--horizontal">
                            <!-- RET URL -->
                            <button class="slds-button slds-button--neutral" onclick="redirectRetURL();">Cancel</button>
                            <button class="modalWizSubmit slds-button slds-button--neutral slds-button--brand">Done</button>
                        </div>
                    </div>
                </div>
            </div>
            <div id="modalDivBackDrop" class="slds-backdrop"></div>
        </div>

 
Is there a visual flow repository where users contribute and get flows? I hate to re-invent the wheel.
In place of the standard "New Opportunity" screen we have a VF Page. When a user is presented with this VF page there is an Account lookup field. I have reciently disabled the Quick Create feature on this picklist. However, I would like to have the same functionality that Quick Create provides. In other words if the user cannot find the Account in the selection list, the should be able to close the selection list and click on a button or link which would allow them to create a new Account. So, I haev two questions: 1) what is the best way to accomplish this considering I'm confined to using a VF page. 2) Assuming that a "Global Action" is a good solution, what visualforce code do I need to render the Global Action on the page?
Regards,
Mike
 

I am reviewing a Critical Update. Here is the Update Summary:
This update enables clickjack protection for all non-setup Salesforce pages. If you use <iframe> elements to frame pages from a non-Salesforce domain, this update will impact your organization.

 

We DO have VisualForce pages which <iframe> pages from our homegrown applications. So I was reluctant to ACTIVATE this Update. Instead, I figured I'd try to Activate it in our sandbox just to see what would happen to our <iframe>s. Much to my surprise, nothing happened. Our iframes continued to load with no problem. 

 

Can anybody explain why Salesforce says, "this update will impact your organization" and yet my organization is not impacted? Do I have to wait a day or two the the Update to take effect? Are there exceptions to the rule? Does it maybe work on some browsers but not others? 

 

This is a very poorly explained Critical Update considering  it could potentially  disable my entire production Org if I overlooked something.

 

Thanks,

Mike

 

 

https://help.salesforce.com/apex/HTViewHelpDoc?id=search_overview.htm&language=en_US

I found the above, but it only has a loose connection with reality. For example, this documents mentions "Advanced Search", but I only have "Side Bar Search" and "Global Search". At least I think thats what I have because nowhere on my screen does it actually say: "Side Bar Search" and "Global Search". 

 

Is there any documentation on this subject that corresponds with what I actually see on my Salesforce Home Tab screen?

 

TIA,

Mike

 

This has been working in production for around a year and suddenly it stopped working over the weekend. 

 

below is the initialization section of the OpportunityControllerExtension

followed by the debugging log showing the error.

I've highlighted the offending line of code in RED.

 

This same code worked in Prod up until this weekend, and the same code also works perfectly in Sandbox. 

 

I have users who are up in arms, so any help would be appreciated.

Thanks,

Mike

 

 

public with sharing class OpportunityControllerExtension {

   private final Opportunity opp;
   private final Opportunity currentOpportunity;
   private final Account billingAccount;
   private final Account agency;
   
   private aaWSDLBeans.CampaignInfo[] campaignInfo;
   private List<OpportunitySplit> splitList;
   private List<OpportunityPartner> agencyList;
   private List<Revenue_Forecast__c> newRevenueForecasts;
   public  boolean debug;
   
   public OpportunityControllerExtension(ApexPages.StandardController stdController) {
      currentOpportunity = (Opportunity)stdController.getRecord();
      debug = false;
      this.opp = [
         SELECT
              o.StageName
            , o.Name
            , o.Estimated_Revenue_Start_Date__c
            , o.Estimated_Revenue_End_Date__c
            , o.campaign_total__c
            , o.OwnerId
            , o.AccountId
            , o.AutoIO__c
            , o.I_O__c
            , o.PO__c
            , o.account.type
            , o.account.Category__c
            , o.account.sub_category__c
            , o.billing_io_key__c
            , o.account.platform_id__c
            , o.account.agency_name__r.id
            , o.account.agency_name__r.name
            , o.account.parent.name
            , o.account.name 
            , o.account.owner.name 
            , o.account.Primary_Campaign_Manager__c 
            , o.account.owner.email 
            , o.account.BillingStreet 
            , o.account.CS_Login_First_Name__c 
            , o.account.BillingCity 
            , o.account.CS_Login_Last_Name__c  
            , o.account.BillingState 
            , o.account.Website 
            , o.account.BillingPostalCode 
            , o.account.Account_Email__c 
            , o.account.BillingCountry       
            , o.account.Phone       
             ,   (SELECT Month__c, Split_Owner__r.Name, Revenue__c, Split__c, Split_Revenue__c 
                    FROM Revenue_Forecasts__r order by Month__c, Split_Owner__r.Name)
         FROM Opportunity o
         WHERE o.id = :currentOpportunity.id];

      /*this.billingAccount = currentOpportunity.account;*/
      this.billingAccount = opp.account;
      this.agency = opp.account.agency_name__r;           
  
      this.splitList = [
         Select o.SplitPercentage, o.SplitOwnerId, o.SplitAmount
         From OpportunitySplit o
         Where o.OpportunityId = :currentOpportunity.id];
         
      if (splitList.isEmpty()) {
         splitList = new List<OpportunitySplit>();
         splitList.add(new OpportunitySplit(OpportunityId = opp.id, 
                           SplitOwnerId = opp.OwnerId, SplitPercentage = 100));
      }
      calcNewRevenueForecasts();
   }

12:01:11.275 (275088000)|SOQL_EXECUTE_BEGIN|[17]|Aggregations:1|select o.StageName, o.Name, o.Estimated_Revenue_Start_Date__c, o.Estimated_Revenue_End_Date__c, o.campaign_total__c, o.OwnerId, o.AccountId, o.AutoIO__c, o.I_O__c, o.PO__c, o.account.type, o.account.Category__c, o.account.sub_category__c, o.account.platform_id__c, o.account.agency_name__r.id, o.account.agency_name__r.name, o.account.parent.name, o.account.name, o.account.owner.name, o.account.owner.email, o.account.Primary_Campaign_Manager__c, o.account.BillingStreet, o.account.CS_Login_First_Name__c, o.account.BillingCity, o.account.CS_Login_Last_Name__c, o.account.BillingState, o.account.Website, o.account.BillingPostalCode, o.account.Account_Email__c, o.account.BillingCountry, o.account.Phone, o.billing_io_key__c, (select Month__c, Split_Owner__r.Name, Revenue__c, Split__c, Split_Revenue__c from Revenue_Forecasts__r order by Month__c, Split_Owner__r.Name) from Opportunity o where o.id = :tmpVar1
12:01:11.330 (330646000)|SOQL_EXECUTE_END|[17]|Rows:1
12:01:11.331 (331377000)|SOQL_EXECUTE_BEGIN|[60]|Aggregations:0|select o.SplitPercentage, o.SplitOwnerId, o.SplitAmount from OpportunitySplit o where o.OpportunityId = :tmpVar1
12:01:11.384 (384942000)|EXCEPTION_THROWN|[60]|System.QueryException: null
12:01:11.385 (385075000)|SYSTEM_MODE_EXIT|false
12:01:11.385 (385245000)|CODE_UNIT_FINISHED|OpportunityControllerExtension <init>

We have Email to Case set up and all that works fine, but my users want to be able to reply to these emails, which they can. However, here is where the problems start. On the "Send an Email" screen there is the "Additional To:" field. When I click on the Lookup Icon, I get the "Email Address Lookup"  pop-up window. There is a picklist field on this screen labeled "Show", and the default value is "All Co-workers in Company". In fact, not only is this the default value, it is the ONLY value. I don't want to select a "co-worker", I WANT to select Contacts!  Why can't I see "Contacts" as the "Show:" picklist value? 

I am a developer with admin privs, so is there any way I can:

 

1) change the behaviour of the Email Address Lookup screen through configuration

2) change the behaviour of the Email Address Lookup screen by enhancement

3) completely replace all of the send email functionality? Roll my own?

4) an App in the App exchange that addresses this problem?

 

Thanks for any help.

Mike

 

 

 

I am trying to use Email to Case in my sandbox. I started by doing a complete refresh of our development sandbox. All of the Email to Case Routing Addresses were successfully copied to the new sandbox. However, as expected, the "Email Service Address"s were not copied. So I regenerated a couple of the Service Addresses. Still no problem. Then I clicked on one of the service addresses, and as expected, it popped open a Microsoft Outlook New Email window with the "To" address pre-populated. Then I filled in a Subject: line and typed in a few Body: lines and clicked on "Send". It went perfectly, a new Case was created in Salesforce. So, I tried sending another Email to the exact same "Service Address". This time it FAILED. Instead, I got a bounced email back to my Outlook Inbox. I repeated the experiment multiple times, each time getting a bounced email. I tried sending the Email to Case from my Gmail account; same result, bounced email.

 

Screen Snap of Bounced Email 

 

I tried the same thing again using some other newly generated sandbox Service Addresses. Same thing. The first attempt to send Email to Case succeded, but sending to the same address again failed. That was Thursday, but now, I can't even get a single success even with trying a freshly generated Service Address. Very frustrated. Thanks for any help.

Mike

 

This page:

 

<apex:page renderAs="PDF" standardStylesheets="false" >
<ol>
  <li>test1</li>
  <ol>
    <li>test2</li>
  </ol>
  <li>test3</li>
</ol>
</apex:page>

 

 

 

renders like:

1. test1

1. test2

*  test3   (where * is a bullet)

 

It should render like:

 

1. test1

   1.test2

2. test3

 

When I look at the non-pdf version (visualforce page) it renders perfectly.

 

 

First, I created a normal Report based on Opportunity. However, I wanted to change the name on one of the columns. I read that the only way to do this is by using a Custom Report Type. So, I created a Custom Report Type  with just the handfull of Opportunity columns I needed. Then I created a Report based on this Custom Report Type. The problem is, the resultant report seems to be filtering out hundreds of Opportunity records. (i.e. the records don't display when I run the report) My first thought was the problem has something to do with the Hierarchy Level setting. Report based on Custom Report Type, the default is "checked". For the Report based directly on Opportunity, the default is "unchecked". 

 

For the  Custom Report Type - Report, I tried to uncheck the  Hierarchy Level and save, however when I try to edit again, the  Hierarchy Level has reverted itself back to "checked".

 

I am System Admin and am trying to develop this report for non-system admin users.

Thanks,

Mike

 

Workflows fire when a record is "Edited". Does the workflow fire if some APEX code does an UPDATE on the record. I'm guessing not, but I can't find any documentation to support this theory.

TIA

Mike

ClientCampaignDetailsApex Class716dimensions is not a fieldSet of ClientCampaign__c

 

I am getting the above error when I try to a Validate on a Change Set. The problem is, I can't find a reference to "dimensions" anywhere. I think I DID create a fieldSet named "dimensions" as an experiment in my source Org (sandbox), but I deleted it. 

 

so QUESTION, do Change Sets, make a copy of the objects at the moment when you add the object to the Change Set, OR do they get the specified objects at the moment the Change set is UPLOADed to the target ORG? 

 

If it DOES make a copy of the objects, and then  I CLONE a Change Set, does it make a fresh copy of all the objects at that moment, or does it copy definitions of the Objects from the Change Set which is being cloned?

 

TIA

Mike

 

I am reviewing a Critical Update. Here is the Update Summary:
This update enables clickjack protection for all non-setup Salesforce pages. If you use <iframe> elements to frame pages from a non-Salesforce domain, this update will impact your organization.

 

We DO have VisualForce pages which <iframe> pages from our homegrown applications. So I was reluctant to ACTIVATE this Update. Instead, I figured I'd try to Activate it in our sandbox just to see what would happen to our <iframe>s. Much to my surprise, nothing happened. Our iframes continued to load with no problem. 

 

Can anybody explain why Salesforce says, "this update will impact your organization" and yet my organization is not impacted? Do I have to wait a day or two the the Update to take effect? Are there exceptions to the rule? Does it maybe work on some browsers but not others? 

 

This is a very poorly explained Critical Update considering  it could potentially  disable my entire production Org if I overlooked something.

 

Thanks,

Mike

 

 

I'm using Bulk API 2 to load a custom table/object named ExternalStaging. This part is working fine. After the records are loaded into ExternalStaging, I want to read each record and upsert an Opportunity based on the data. What tool is best to use for this? Process Builder? Visual Flow? Trigger? scheduled APEX? 
Our standard 'New Opportunity' button is overriden to invoke a visualforce page. Can I create a different 'New Opportunity' button for use only on the Account screen's Opportunity Related List which does NOT invoke that invoke that same visualforce page. 
Button intended for Account Screen's Opportunity Related ListThe above imiage shows a button which is intended for the Opportunity Related List on the Account screen. I have successfully place this button there. The problem is that when I click on the button the visualforce page defined on the standard New opportunity button still gets launched. 
Here is the overridden Stanard New Opportunity button.
Shows Standard Button is overriden with VF pageShows how Standard New button is defined with override VFSo, again, even though New2 button is on the related list, the "OpportunityCreate" visualforce page is still invoked. 
Hopefull this is clear., 
thanks
 
Posting now to General Development because no answer on APEX Code Development. 

We had a 3rd party do a customization for us. They overrode the New Opportunity button with a button that invokes a visualforce page. The controller for this VF page marshalls the data and then creates an opportunity. The problem is when the user clicks the NEW Opportunity button from an Account screen. The Account Name is not autopopulated to the Opportunity.Is there any way to Access the Account Name within the controller for this VF page? 

Thanks 

We had a 3rd party do a customization for us. They overrode the New Opportunity button with a button that invokes a visualforce page. The controller for this VF page marshalls the data and then creates an opportunity. The problem is when the user clicks the NEW Opportunity button from an Account screen. The Account Name is not autopopulated to the Opportunity.Is there any way to Access the Account Name within the controller for this page? This is the first line of that controller just to show that it does not extend the opportunity controller. 

public class OpportunityCreate extends BaseController {

BaseController is virtual.

Thanks 

I have a custom object (Revenue_Amount__c) that is the child on a master-detail relationship with Opportunity. 
My goal is to have the ability to modify data on the Revenue_Amount__c without leaving the Opportunity screen. 
To this end I have created a Visualforce page and an Apex class.
The VF:
<apex:page standardController="Opportunity" extensions="OpportunityActualList"  sidebar="false" showHeader="false">
    <apex:form >
        <apex:pageBlock >
        
            <apex:pageMessages />

            <apex:pageBlockButtons >
                <apex:commandButton value="QuickSave" action="{!quicksave}"/>
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
            <input id="theHiddenInput" type="hidden" name="{!Opportunity.Name}" />
            
            <apex:outputPanel layout="block" style="overflow:auto;width:600px;height:606px" >
              <apex:pageBlockTable value="{!amounts}" var="x" id="list">
                                
                <apex:column headerValue="Id">
                    <apex:inputField value="{!x.Id}"/>
                </apex:column>
                
                <apex:column headerValue="Type">
                    <apex:inputField value="{!x.Type__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Date">
                    <apex:inputField value="{!x.Fiscal_Date__c}"/>
                </apex:column>
                
                <apex:column headerValue="Amount">
                    <apex:inputField value="{!x.Dollar_Amount__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Show">
                    <apex:inputField value="{!x.Show_On_Report__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Opp">
                    <apex:inputField value="{!x.Name}"/>
                </apex:column>


              </apex:pageBlockTable> 

            </apex:OutputPanel> 
        </apex:pageBlock>
    </apex:form>
</apex:page>
Opportunity Controller extension
 
public class OpportunityActualList {

    private final Opportunity opp;

    public OpportunityActualList(ApexPages.StandardController stdController) {
        this.opp = (Opportunity)stdController.getRecord();
    }

    public ApexPages.StandardSetController setCon {
        get {
            if(setCon == null) {

                setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
                    [SELECT id, MonthlyRevenueAmounts__r.name , Dollar_Amount__c, type__c, Fiscal_Date__c, Show_On_Report__c, Revenue_Amount__c.Name
                       FROM Revenue_Amount__c
                   WHERE MonthlyRevenueAmounts__r.name = :opp.Name
                   and  Show_On_Report__c = 'SHOW'
                   and  Type__c = 'Actual'
                   order by Fiscal_Date__c desc ]));
            }
            return setCon;
        }
        set;
    }

    public List<Revenue_Amount__c> getAmounts() {
        return (List<Revenue_Amount__c>) setCon.getRecords();
    }
}
Opportunity screen image. In reality I only need the Date and Amount column.
User-added imageWhen I change an amount and then click on QuickSave, the panel (shown above) refreshes and the new amount value is shown. The behaviour is like you would expect when you do an update. But, when you view the actual Revenue_Amount__c record, the old value is still there.   

the log
46.0 APEX_CODE,DEBUG;APEX_PROFILING,NONE;CALLOUT,NONE;DB,INFO;NBA,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,NONE
11:08:17.0 (455361)|USER_INFO|[EXTERNAL]|00580000003ZDZy|mmoore@quinstreet.com.mike|(GMT-07:00) Pacific Daylight Time (America/Los_Angeles)|GMT-07:00
11:08:17.0 (497720)|EXECUTION_STARTED
11:08:17.0 (503871)|CODE_UNIT_STARTED|[EXTERNAL]|066220000000ReR|VF: /apex/Opportunity_YoY_Actuals
11:08:17.0 (1228336)|VF_DESERIALIZE_VIEWSTATE_BEGIN|066220000000ReR
11:08:17.0 (8968923)|VF_DESERIALIZE_VIEWSTATE_END
11:08:17.9 (9763059)|SYSTEM_MODE_ENTER|true
11:08:17.10 (10437964)|SYSTEM_MODE_ENTER|true
11:08:17.0 (10999702)|SYSTEM_MODE_ENTER|true
11:08:17.77 (77859418)|SYSTEM_MODE_ENTER|true
11:08:17.0 (85970297)|CODE_UNIT_STARTED|[EXTERNAL]|VF Controller Save
11:08:17.0 (85991440)|SYSTEM_MODE_ENTER|false
11:08:17.0 (134521244)|CODE_UNIT_STARTED|[EXTERNAL]|Validation:Opportunity:00622000002jJP3
11:08:17.0 (134542832)|VALIDATION_RULE|03d80000000PY2P|B2B_Campaign_Objectives_Required
11:08:17.0 (134842407)|VALIDATION_FORMULA|Probability >= 0.5 &&
RecordTypeId = '01280000000BpSv' &&
isPickVal (Campaign_Objectives__c ,'--None--'   )|RecordTypeId=01280000000Hqet , Campaign_Objectives__c=null , Probability=10.0
11:08:17.0 (134851463)|VALIDATION_PASS
11:08:17.0 (134854689)|VALIDATION_RULE|03d80000000PY2F|B2B_Enhancements_Additions_Required
11:08:17.0 (134952606)|VALIDATION_FORMULA|Probability >= 0.50  &&
RecordTypeId = '01280000000BpSv' &&
isBlank ( Enhancements_Additions__c )|Enhancements_Additions__c=null , RecordTypeId=01280000000Hqet , Probability=10.0
11:08:17.0 (134958799)|VALIDATION_PASS
11:08:17.0 (134961891)|VALIDATION_RULE|03d800000006Txv|B2B_MustBeNotNullWhenAccountIsAgency
11:08:17.0 (135194241)|VALIDATION_FORMULA|NOT(ISPICKVAL(Account.Originating_System__c, 'ITBE'))
&&
ISPICKVAL(Category__c, 'Business to Business') 
&& 
LEN(Client_Name__c) = 0
&& 
ISPICKVAL(Account.Type, 'Agency')|Account.Type=null , Client_Name__c=null , Category__c=null , Account.Originating_System__c=<Not Migrated>
11:08:17.0 (135205236)|VALIDATION_PASS
11:08:17.0 (135208369)|VALIDATION_RULE|03d800000006Txq|B2B_MustBeNullWhenAccountIsClient
11:08:17.0 (135401165)|VALIDATION_FORMULA|NOT(ISPICKVAL(Account.Originating_System__c, 'ITBE'))
&&
ISPICKVAL(Category__c, 'Business to Business')
&&
LEN(Client_Name__c) > 0
&&
ISPICKVAL(Account.Type, 'Client')|Account.Type=null , Client_Name__c=null , Category__c=null , Account.Originating_System__c=<Not Migrated>
11:08:17.0 (135413060)|VALIDATION_PASS
11:08:17.0 (135416218)|VALIDATION_RULE|03d80000000PY2K|B2B_Topic_Segment_Required
11:08:17.0 (135544996)|VALIDATION_FORMULA|and(
Probability >= 0.50 ,
RecordTypeId = '01280000000BpSv',
or (isBlank (Topic_Segment__c),isNull(Topic_Segment__c) )
)|RecordTypeId=01280000000Hqet , Probability=10.0 , Topic_Segment__c=null
11:08:17.0 (135552711)|VALIDATION_PASS
11:08:17.0 (135555512)|VALIDATION_RULE|03d80000000Tidg|Check_CompanyId_Value
11:08:17.0 (135653731)|VALIDATION_FORMULA|AND(
	(LID__LinkedIn_Company_Id__c <> NULL),
	NOT(ISNUMBER(LID__LinkedIn_Company_Id__c))
)|LID__LinkedIn_Company_Id__c=null
11:08:17.0 (135661258)|VALIDATION_PASS
11:08:17.0 (135664131)|VALIDATION_RULE|03d80000000TfFC|CSD_user_Stage_restriction
11:08:17.0 (137741521)|VALIDATION_FORMULA|( ISPICKVAL( StageName , 'Close Within (1) Week')  &#124;&#124; ISPICKVAL(StageName, 'Closed Won') )  &&  $UserRole.Name  = 'B2B Tech Rep' &&  ISCHANGED( StageName )|StageName=Advanced Negotiations , $UserRole.Name=System Admin
11:08:17.0 (137756366)|VALIDATION_PASS
11:08:17.0 (137759931)|VALIDATION_RULE|03d80000000LHtS|EDU_Product_Month_is_Day_1_of_Month
11:08:17.0 (137871970)|VALIDATION_FORMULA|DAY(EDU_Product_Month__c)  <>  1|EDU_Product_Month__c=2019-05-01 00:00:00
11:08:17.0 (137885584)|VALIDATION_PASS
11:08:17.0 (137888747)|VALIDATION_RULE|03d80000000Thle|no_change_account_after_platform_push
11:08:17.0 (138000798)|VALIDATION_FORMULA|PRIORVALUE(  AccountId  ) <> AccountId
&&
  billing_io_key__c   <>   NULL|AccountId=0012200000IrAZe , billing_io_key__c=null
11:08:17.0 (138007160)|VALIDATION_PASS
11:08:17.0 (138009936)|VALIDATION_RULE|03d80000000TXwy|no_change_system_IO_number
11:08:17.0 (138101947)|VALIDATION_FORMULA|PRIORVALUE( I_O__c ) = AutoIO__c
&&
 I_O__c != AutoIO__c|AutoIO__c=234955 , I_O__c=234955
11:08:17.0 (138107478)|VALIDATION_PASS
11:08:17.0 (138110350)|VALIDATION_RULE|03d80000000TZ79|Rep_no_change_total_after_contract_sent
11:08:17.0 (138269689)|VALIDATION_FORMULA|ISCHANGED(Opportunity_Total__c ) && 
$UserRole.Name = 'B2B Tech Rep' &&     
(
ISPICKVAL(StageName , 'Contract Sent') &#124;&#124;
ISPICKVAL(StageName , 'Close Within (1) Week') &#124;&#124;
ISPICKVAL(StageName , 'Closed Won') &#124;&#124;
ISPICKVAL(StageName , 'Closed Lost') &#124;&#124;
ISPICKVAL(StageName , 'Void/Cancel')
)|StageName=Advanced Negotiations , $UserRole.Name=System Admin , Opportunity_Total__c=null
11:08:17.0 (138279929)|VALIDATION_PASS
11:08:17.0 (138282683)|VALIDATION_RULE|03d80000000TUZK|ValueInPickList
11:08:17.0 (138419726)|VALIDATION_FORMULA|NOT(CONTAINS("Business to Business:Careers:Education:Financial Services:Home Services:Medical and Health:Travel:Advertising", TEXT(Category__c)))|Category__c=null
11:08:17.0 (138427087)|VALIDATION_PASS
11:08:17.0 (138429779)|VALIDATION_RULE|03d80000000Tc5i|B2BTech_Closed_Lost_Description_Required
11:08:17.0 (138598236)|VALIDATION_FORMULA|AND( ISPICKVAL(Account.Sub_category__c,'Business to Business - Tech'),
 Closed_Lost_Description__c ='',  OR(ISPICKVAL(StageName, 'Closed Lost')) )|Closed_Lost_Description__c=null , StageName=Advanced Negotiations , Account.Sub_category__c=null
11:08:17.0 (138606373)|VALIDATION_PASS
11:08:17.0 (138609219)|VALIDATION_RULE|03d80000000Tc5Y|B2BTech_Reason_Lost_Required
11:08:17.0 (138783050)|VALIDATION_FORMULA|AND( ISPICKVAL(Account.Sub_category__c,'Business to Business - Tech'),
 ISPICKVAL(Reason_Lost__c,''),  OR(ISPICKVAL(StageName, 'Closed Lost'),ISPICKVAL(StageName,'Void/Cancel')) )|Reason_Lost__c=null , StageName=Advanced Negotiations , Account.Sub_category__c=null
11:08:17.0 (138793120)|VALIDATION_PASS
11:08:17.0 (138797149)|VALIDATION_RULE|03d80000000TUci|Deal_Type_Total
11:08:17.0 (139156264)|VALIDATION_FORMULA|AND
(  Probability >= 0.50,
   RecordTypeId != '01280000000QEuM',
   RecordTypeId != '01280000000Bp05',
   RecordTypeId != '01280000000Bp03',
   RecordTypeId != '01280000000Bp06',
   RecordTypeId != '01280000000Bp07',
   RecordType.Name != 'EDU_BUDGET',
   ISPICKVAL (Account.Sub_category__c , 'Business to Business - Tech'),
   NOT(ISPICKVAL(Account.Originating_System__c, 'ITBE')),
   (
      NULLVALUE(Deal_Type_Click__c, 0) +
      NULLVALUE(Deal_Type_CPA__c, 0) +
      NULLVALUE(Deal_Type_Display__c, 0) +
      NULLVALUE(Deal_Type_eSeminar_percent__c, 0) +
      NULLVALUE(Deal_Type_other_percent__c, 0) +
      NULLVALUE(Deal_Type_Lead__c, 0)
   ) != 1
)|Deal_Type_CPA__c=null , Deal_Type_other_percent__c=null , RecordTypeId=01280000000Hqet , Deal_Type_Display__c=null , Probability=10.0 , Account.Originating_System__c=<Not Migrated> , RecordType.Name=EDU Budget , Deal_Type_Lead__c=null , Deal_Type_Click__c=null , Account.Sub_category__c=null , Deal_Type_eSeminar_percent__c=null
11:08:17.0 (139178030)|VALIDATION_PASS
11:08:17.0 (139180862)|VALIDATION_RULE|03d80000000TdkB|InvoiceNotesMax240Chars
11:08:17.0 (139246906)|VALIDATION_FORMULA|LEN(Invoice_Notes__c)  > 240|Invoice_Notes__c=null
11:08:17.0 (139252236)|VALIDATION_PASS
11:08:17.0 (139254856)|VALIDATION_RULE|03d80000000Aptd|StageNameIsNotNone
11:08:17.0 (139300766)|VALIDATION_FORMULA|ISPICKVAL(StageName , '--None--')|StageName=Advanced Negotiations
11:08:17.0 (139305707)|VALIDATION_PASS
11:08:17.0 (139313558)|CODE_UNIT_FINISHED|Validation:Opportunity:00622000002jJP3
11:08:17.0 (200133293)|CODE_UNIT_STARTED|[EXTERNAL]|Workflow:Opportunity
11:08:17.0 (227360016)|CODE_UNIT_FINISHED|Workflow:Opportunity
11:08:17.0 (238675011)|CODE_UNIT_FINISHED|VF Controller Save
11:08:17.241 (241425173)|SYSTEM_MODE_ENTER|true
11:08:17.241 (241638407)|SYSTEM_MODE_ENTER|true
11:08:17.0 (242121504)|SYSTEM_MODE_ENTER|true
11:08:17.269 (269720864)|SYSTEM_MODE_ENTER|true
11:08:17.269 (269929739)|SYSTEM_MODE_ENTER|true
11:08:17.0 (339122653)|VF_SERIALIZE_VIEWSTATE_BEGIN|066220000000ReR
11:08:17.0 (342512976)|VF_SERIALIZE_VIEWSTATE_END
11:08:17.0 (346352402)|CODE_UNIT_FINISHED|VF: /apex/Opportunity_YoY_Actuals
11:08:17.0 (347540377)|EXECUTION_FINISHED

 
I've read everything I can on this error (subject line) but I think I AM querying the request field, so I need help. I have a custom object as the detail side of a Master-Detail relationship with Opportunity as the parent. II'm building a very simple Visualforce page which is placed on the Opportunity screen.
<apex:page standardController="Opportunity" extensions="opportunityListYoY"  sidebar="false" showHeader="false">
    <apex:form >
        <apex:pageBlock >
            <apex:pageMessages />
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!quicksave}"/>
            </apex:pageBlockButtons>
            
            <apex:pageBlockTable value="{!amounts}" var="x" id="list">
            
                <apex:column headerValue="Type">
                    <apex:inputField value="{!x.type__c}"/>
                </apex:column>
                 
                <apex:column headerValue="Opp">
                    <apex:inputField value="{!x.MonthlyRevenueAmounts__r.name}"/>
                </apex:column>
                
                <apex:column headerValue="Amount">
                    <apex:inputField value="{!x.Dollar_Amount__c}"/>
                </apex:column>

            </apex:pageBlockTable> 
        </apex:pageBlock>
    </apex:form>
</apex:page>
The controller extension is:
public class opportunityListYoY {

    private final Opportunity opp;

    public opportunityListYoY(ApexPages.StandardController stdController) {
        this.opp = (Opportunity)stdController.getRecord();
    }

    public ApexPages.StandardSetController setCon {
        get {
            if(setCon == null) {
                setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
                    [SELECT MonthlyRevenueAmounts__r.name , Dollar_Amount__c, type__c, Fiscal_Date__c, Show_On_Report__c 
                       FROM Revenue_Amount__c
                //    WHERE MonthlyRevenueAmounts__r.name = 'Mikes Opp'  ]));  <--- THIS LINE WORKS FINE
                      WHERE MonthlyRevenueAmounts__r.name = :opp.Name  ]));  <-- this line rasises the error
                    
            }
            return setCon;
        }
        set;
    }

    public List<Revenue_Amount__c> getAmounts() {
        return (List<Revenue_Amount__c>) setCon.getRecords();
    }
}
TIA,
Mike

 
Hi  
Everyone How to calculate distance between two marker and show them on the Map like CheckIn and CheckOut when user check in then its show on the map i doing this already now i want to show checkout also on the map and also distance calculate between them and  distance show on the checkin marker 

Please Replay ASAP 
Thanks in Advance
Neeraj
Hi,

This is kiling me. I want to update the stage of the opportunity when DocuSing field sent has a value (Date and time).
Created a flow. But for some reason doesn't fire. What am i doing wrong?
Please see screenshots.

User-added image

User-added image

User-added image

User-added image

User-added image
I am able to launch my Flow is a SLDS modal but when I click on the Flow's NEXT button, the entire VF page is re-rendered. How can I make the NEXT button function properly?
// Mike Modal methods
        function openModal2() {
        console.log('running openModal2');
            j$("#modalWizDiv").addClass('slds-modal--large');
            j$("#modalWizDiv").addClass('slds-fade-in-open');
            j$("#modalWizDivBackDrop").addClass('slds-backdrop--open');
            j$("#modalWizLoading").addClass('slds-hide');
            j$(".modalWizSubmit").click(function(event) {
            console.log('running in event')
            closeWizModal();
            });
 
<!-- New Account Wizard Modal -->
        <div>
            <div id="modalWizDiv" aria-hidden="false" role="dialog" class="slds-modal">
            
                <div id="modalWizLoading" style="transition:opacity 0.4s linear;z-index:99999; opacity:1; width:100%; height:100%; position:fixed;right:0;bottom:0;left:0;background:rgba(255,255,255,0.85);">
                    <div class="slds-spinner--large" style="position:fixed; top:30%; left:45%;">
                        <img src="{!$Resource.SLDS203}/assets/images/spinners/slds_spinner_brand.gif" alt="Loading..." />
                    </div>
                </div>
                
                <div class="slds-modal__container">
                    <div class="slds-modal__header">
                        <h2 class="slds-text-heading--medium">New Account</h2>
                    </div>
                    <!-- Modal Content -->
                    <div class="slds-modal__content slds-p-around--medium">
                        <!-- Error Message -->
                        <div class="modalWizPageMessages slds-box slds-theme--error slds-m-bottom--large slds-hide">
                          <p>Some Random
                            <strong>text</strong>.</p>
                        </div>
                        <!-- / Error Message -->
                        <div class="slds-align--absolute-center">

                            <fieldset class="slds-form-element is-required">
                                <div class="slds-float--left">
                                    <legend class="slds-form-element__legend slds-form-element__label">Select a Legend</legend>
                                </div>
                                
                                <div id="wizardContainer" class="slds-form-element__control slds-float--left slds-m-right--xx-large slds-p-right--xx-large">
                                   <flow:interview name="New_Account_Wizard"></flow:interview>
                                </div>

                                <div class="slds-clearfix"></div>
                            </fieldset>

                        </div>
                    </div>
                    <!-- / Modal Content -->                           
                        <div class="slds-modal__footer">
                        <div class="slds-x-small-buttons--horizontal">
                            <!-- RET URL -->
                            <button class="slds-button slds-button--neutral" onclick="redirectRetURL();">Cancel</button>
                            <button class="modalWizSubmit slds-button slds-button--neutral slds-button--brand">Done</button>
                        </div>
                    </div>
                </div>
            </div>
            <div id="modalDivBackDrop" class="slds-backdrop"></div>
        </div>

 
In place of the standard "New Opportunity" screen we have a VF Page. When a user is presented with this VF page there is an Account lookup field. I have reciently disabled the Quick Create feature on this picklist. However, I would like to have the same functionality that Quick Create provides. In other words if the user cannot find the Account in the selection list, the should be able to close the selection list and click on a button or link which would allow them to create a new Account. So, I haev two questions: 1) what is the best way to accomplish this considering I'm confined to using a VF page. 2) Assuming that a "Global Action" is a good solution, what visualforce code do I need to render the Global Action on the page?
Regards,
Mike
 
We have an action of type ‘Custom Visualforce’ on a custom object called Trip. This action is added as a quick action in to the ‘Quick Actions in the Salesforce Classic Publisher’ menu in the page layout of the trip object.
The action is a simple visualforce page with firstname and lastname columns which when entered creates an account and also creates a related record for trip member object (after clicking the create member button). The objective of this VF page was a way for users to quickly create an account if it did not exist and doing it from the quick action on the page would save some time. There is a master detail relationship between trip and trip member and the trip members appear as a related list in the trip page layout.
Code is very similar to this. https://help.salesforce.com/HTViewHelpDoc?id=custom_actions_vf_pages_for_object_actions.htm&langu_3
The issue is we the related list does not get refreshed once an account has been created using the quick action , I know this is not possible with standard sf and we may have to go for a VF page. Issue is users have to refresh the page to see if the trip member has been added to the page.
But I was also wondering if there was a better way of implementing this whole thing.
Any suggestion is much appreciated
I have an escalation rule in case objects.After 1 day i triggering my escalation rule. Is Escalated is getting set on case.
How I will change the status of case to "Escalated" after escalation automatically.
Please provide me your suggestions.

This has been working in production for around a year and suddenly it stopped working over the weekend. 

 

below is the initialization section of the OpportunityControllerExtension

followed by the debugging log showing the error.

I've highlighted the offending line of code in RED.

 

This same code worked in Prod up until this weekend, and the same code also works perfectly in Sandbox. 

 

I have users who are up in arms, so any help would be appreciated.

Thanks,

Mike

 

 

public with sharing class OpportunityControllerExtension {

   private final Opportunity opp;
   private final Opportunity currentOpportunity;
   private final Account billingAccount;
   private final Account agency;
   
   private aaWSDLBeans.CampaignInfo[] campaignInfo;
   private List<OpportunitySplit> splitList;
   private List<OpportunityPartner> agencyList;
   private List<Revenue_Forecast__c> newRevenueForecasts;
   public  boolean debug;
   
   public OpportunityControllerExtension(ApexPages.StandardController stdController) {
      currentOpportunity = (Opportunity)stdController.getRecord();
      debug = false;
      this.opp = [
         SELECT
              o.StageName
            , o.Name
            , o.Estimated_Revenue_Start_Date__c
            , o.Estimated_Revenue_End_Date__c
            , o.campaign_total__c
            , o.OwnerId
            , o.AccountId
            , o.AutoIO__c
            , o.I_O__c
            , o.PO__c
            , o.account.type
            , o.account.Category__c
            , o.account.sub_category__c
            , o.billing_io_key__c
            , o.account.platform_id__c
            , o.account.agency_name__r.id
            , o.account.agency_name__r.name
            , o.account.parent.name
            , o.account.name 
            , o.account.owner.name 
            , o.account.Primary_Campaign_Manager__c 
            , o.account.owner.email 
            , o.account.BillingStreet 
            , o.account.CS_Login_First_Name__c 
            , o.account.BillingCity 
            , o.account.CS_Login_Last_Name__c  
            , o.account.BillingState 
            , o.account.Website 
            , o.account.BillingPostalCode 
            , o.account.Account_Email__c 
            , o.account.BillingCountry       
            , o.account.Phone       
             ,   (SELECT Month__c, Split_Owner__r.Name, Revenue__c, Split__c, Split_Revenue__c 
                    FROM Revenue_Forecasts__r order by Month__c, Split_Owner__r.Name)
         FROM Opportunity o
         WHERE o.id = :currentOpportunity.id];

      /*this.billingAccount = currentOpportunity.account;*/
      this.billingAccount = opp.account;
      this.agency = opp.account.agency_name__r;           
  
      this.splitList = [
         Select o.SplitPercentage, o.SplitOwnerId, o.SplitAmount
         From OpportunitySplit o
         Where o.OpportunityId = :currentOpportunity.id];
         
      if (splitList.isEmpty()) {
         splitList = new List<OpportunitySplit>();
         splitList.add(new OpportunitySplit(OpportunityId = opp.id, 
                           SplitOwnerId = opp.OwnerId, SplitPercentage = 100));
      }
      calcNewRevenueForecasts();
   }

12:01:11.275 (275088000)|SOQL_EXECUTE_BEGIN|[17]|Aggregations:1|select o.StageName, o.Name, o.Estimated_Revenue_Start_Date__c, o.Estimated_Revenue_End_Date__c, o.campaign_total__c, o.OwnerId, o.AccountId, o.AutoIO__c, o.I_O__c, o.PO__c, o.account.type, o.account.Category__c, o.account.sub_category__c, o.account.platform_id__c, o.account.agency_name__r.id, o.account.agency_name__r.name, o.account.parent.name, o.account.name, o.account.owner.name, o.account.owner.email, o.account.Primary_Campaign_Manager__c, o.account.BillingStreet, o.account.CS_Login_First_Name__c, o.account.BillingCity, o.account.CS_Login_Last_Name__c, o.account.BillingState, o.account.Website, o.account.BillingPostalCode, o.account.Account_Email__c, o.account.BillingCountry, o.account.Phone, o.billing_io_key__c, (select Month__c, Split_Owner__r.Name, Revenue__c, Split__c, Split_Revenue__c from Revenue_Forecasts__r order by Month__c, Split_Owner__r.Name) from Opportunity o where o.id = :tmpVar1
12:01:11.330 (330646000)|SOQL_EXECUTE_END|[17]|Rows:1
12:01:11.331 (331377000)|SOQL_EXECUTE_BEGIN|[60]|Aggregations:0|select o.SplitPercentage, o.SplitOwnerId, o.SplitAmount from OpportunitySplit o where o.OpportunityId = :tmpVar1
12:01:11.384 (384942000)|EXCEPTION_THROWN|[60]|System.QueryException: null
12:01:11.385 (385075000)|SYSTEM_MODE_EXIT|false
12:01:11.385 (385245000)|CODE_UNIT_FINISHED|OpportunityControllerExtension <init>

Hi All,

 

I m getting below error while updating Opportunity.

 

System.QueryException: null: 

 

When i query in debug log its works fine, but when i run the Query in class is gives me above exception.

 

Select SplitPercentage, SplitOwnerId, SplitNote, SplitAmount, OpportunityId, Id From OpportunitySplit where OpportunityId!=null and OpportunityId IN('006Z0000007XSSDSSD') limit 50000

 

So any one has any idea where i am going wrong.

 

Thanks

Shailu

 

  • October 01, 2013
  • Like
  • 0