• Gupta
  • NEWBIE
  • 55 Points
  • Member since 2013

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

setoFID = (Set<String>)JSON.deserialize(trids , Set<String>.class);

 

 

How to cover this Line in Test class, it showing (System.NullPointerException: null input to JSON parser) Error Message.

  • September 04, 2013
  • Like
  • 0
 If(feedbackRecord.Flexible__c == null ){
            
            feedbackRecord.Flexible__c.adderror('Enter value');
            return null;
            }
            
            If(feedbackRecord.Responsive__c == null ){
            
            feedbackRecord.Responsive__c.adderror('Enter value');
            return null;
            }
            
            If(feedbackRecord.Helpful__c == null ){
            
            feedbackRecord.Helpful__c.adderror('Enter value');
            return null;
            }

 

  • July 27, 2013
  • Like
  • 0


 
    Public PageReference DoSearch()
        {
            
            ListAcc = [Select Id, Name, BillingCity From Account Where Name Like :('%' + SearchWord + '%')];
            For(Account acc : ListAcc)
            {
                ListAcc1.add(new aAccount(acc));   
            }
            System.debug('========== ListAcc ============' + ListAcc);
            System.debug('========== ListAcc1 ============' + ListAcc1);
            
            return null;
        }
         

 

=================================

<apex:page Controller="sclass6Again">
<apex:form >
    <apex:pageBlock >
   
        <apex:pageblockSection >
            <apex:pageblockSectionItem >
            <apex:outputLabel >
            Search Text :
            </apex:outputLabel>
            
            <apex:panelGroup >
            <apex:inputText value="{!SearchWord}"/>
            <apex:commandButton value="Go" Action="{!doSearch}">
            <apex:actionSupport event="onclick" reRender="x" />
            </apex:commandButton>
            </apex:panelGroup>
            </apex:pageblockSectionItem>   
        </apex:pageblockSection>
           

               
        <apex:pageBlockSection title="Results" id="x" >
            <apex:pageBlockTable value="{!ListAcc1}" var="v">
                <apex:column value="{!v.aRecord.name}"/>
                <apex:column >
                <apex:inputCheckbox value="{!v.Check}"/>
                </apex:column>
                <apex:column value="{!v.b}"/>
            </apex:pageBlockTable>
        </apex:pageBlockSection>
        
        </apex:pageBlock>
        
          
</apex:form>
</apex:page>

 

 

 

 

 

 

 

  • July 24, 2013
  • Like
  • 0


 
    Public PageReference DoSearch()
        {
            
            ListAcc = [Select Id, Name, BillingCity From Account Where Name Like :('%' + SearchWord + '%')];
            For(Account acc : ListAcc)
            {
                ListAcc1.add(new aAccount(acc));   
            }
            System.debug('========== ListAcc ============' + ListAcc);
            System.debug('========== ListAcc1 ============' + ListAcc1);
            
            return null;
        }
         

 

=================================

<apex:page Controller="sclass6Again">
<apex:form >
    <apex:pageBlock >
   
        <apex:pageblockSection >
            <apex:pageblockSectionItem >
            <apex:outputLabel >
            Search Text :
            </apex:outputLabel>
            
            <apex:panelGroup >
            <apex:inputText value="{!SearchWord}"/>
            <apex:commandButton value="Go" Action="{!doSearch}">
            <apex:actionSupport event="onclick" reRender="x" />
            </apex:commandButton>
            </apex:panelGroup>
            </apex:pageblockSectionItem>   
        </apex:pageblockSection>
           

               
        <apex:pageBlockSection title="Results" id="x" >
            <apex:pageBlockTable value="{!ListAcc1}" var="v">
                <apex:column value="{!v.aRecord.name}"/>
                <apex:column >
                <apex:inputCheckbox value="{!v.Check}"/>
                </apex:column>
                <apex:column value="{!v.b}"/>
            </apex:pageBlockTable>
        </apex:pageBlockSection>
        
        </apex:pageBlock>
        
          
</apex:form>
</apex:page>

 

 

 

 

 

 

 

  • July 24, 2013
  • Like
  • 0