• Kals_Kals
  • NEWBIE
  • 0 Points
  • Member since 2013

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

Hello All, 

I have a command button that calls VF page. Below is the code. The content is not being pulled. Any help is greatly appreciated.

 

function openSearchPage(){

            var primaryTabName = 'SearchTab';

            sforce.console.focusPrimaryTabByName(primaryTabName, focusSuccessSearch);

        }

        var focusSuccessSearch = function focusSuccessSearch(){

             sforce.console.openPrimaryTab(null, '/apex/VF_Search_Page', true, 'SearchTab'); 

        };

 

<apex:commandButton value="Search Account" 

                        style="font-size:13px;width:120px;margin-right:10px" 

                        onclick="openSearchPage();return false;"/>

 

When I add VF_Search_Page directly into my app, it works. But not from a command button. Any help would be greatly appreciated.

Thanks.

Hello All,
Here is my test class. I am inserting a record into standard object Case. After insertion, when I am trying to fetch the value of case number, it returns null. But the assert statement works fine. Test class works fine.
Why am I not getting the value for the case that is inserted? Any help is greatly appreciated.
Thanks.

private class TestMyTriggerHandler {

private static Id cNumber;

 

     static testMethod void myUnitTest() {

    Test.startTest();

          Case newCase = new Case( Solution__c = 'Test test test'     Description = 'Test test test');

       

        insert newCase;

       System.assert(newCase != null);

       

cNumber = newCase.CaseNumber;

      System.debug('Case Number is ' +cNumber);       

       Test.stopTest(); 

   }

}

Hello All,
Here is my test class. I am inserting a record into standard object Case. After insertion, when I am trying to fetch the value of case number, it returns null. But the assert statement works fine. Test class works fine.
Why am I not getting the value for the case that is inserted? Any help is greatly appreciated.
Thanks.

private class TestMyTriggerHandler {

private static Id cNumber;

 

     static testMethod void myUnitTest() {

    Test.startTest();

          Case newCase = new Case( Solution__c = 'Test test test'     Description = 'Test test test');

       

        insert newCase;

       System.assert(newCase != null);

       

cNumber = newCase.CaseNumber;

      System.debug('Case Number is ' +cNumber);       

       Test.stopTest(); 

   }

}