• Dharmendra Kumar 60
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 10
    Replies
I tried with URL hack but no luck. Need to crate new site with accountname auto-popluated according to the accountid passed in URL . Pleae guide me if any out of box functionality can be used.
If there is lightning comp required,pls help me with code sample.

Thanks a lot.
I am trying to create related conact to an account passing the accountid into the url,url heck doesn't work properly when JS hits the url and opens a new window ' Account name doesn't auto populate in the new contact window in Lightning'.
Something like this :-
https://dharmendraex-dev-ed.lightning.force.com/lightning/o/Contact/new?Accountid=0017F00000C34HOQAZ

Is there any other way to acheive this ?
 Can we create lightning component that takes accountid as input and opens new contact page ? Please guide .

Thanks in advance
-Dharmendra
I have enabled lightning stylesheet for my VF page. I got lightning look and feel but when I do lookup search ,lookaup dialog comes in classic look. Is there any way to get the lookup dialog in lightning style as well ?

Kidly advise .Thak you.
Hi There,
I am using flow for creating related record .I am struggling to redirect the flow to record detail page after save.Please advise an appropriate approach.

Note: I am launching the flow from url and passing Id.

Thanks in advance.
I am trying to create related conact to an account passing the accountid into the url,url heck doesn't work properly when JS hits the url and opens a new window ' Account name doesn't auto populate in the new contact window in Lightning'-

https://dharmendraex-dev-ed.lightning.force.com/lightning/o/Contact/new?Accountid=0017F00000C34HOQAZ

Am I missing something? Please help me out on this .
 
I need help to create custom button for cloning the Case using lightning Web component . I pretty new to lightning , can somebody please guide me ?
Thanks !
Not Able to Rerender Outputpanel/Pageblocksection on Save action.
Please advise on this -

<apex:page standardcontroller="RAQ_Header__c" extensions="myRAQExtension">
    <apex:pagemessages />
    <apex:form > 
      <apex:pageBlock >         
    <apex:pageBlockSection title="Contract Identification" columns="2">
           <apex:inputField value="{!RAQ_Header__c.name}"/>
          <apex:inputField value="{!RAQ_Header__c.Review_Status__c}"/>
           <apex:inputField value="{!RAQ_Header__c.Opportunity__c}"/>
   
          </apex:pageBlockSection>
       <apex:pageBlockSection columns="1">  
<apex:variable var="rowNum" value="{!0}"/> 
   
    <apex:pageBlockTable value="{!Quests}" var="Quest">
      <apex:column headerValue="Sr No.">
                     <apex:variable var="rowNum" value="{!rowNum + 1}"/>
                     {!rowNum}
                 </apex:column>
      <apex:column value="{!Quest.Question__c}"/>
       <apex:column headerValue=" Your Answer"><apex:inputfield value="{!Quest.Select_Answer__c}"/></apex:column>
       <apex:column headerValue="Comment"><apex:inputfield value="{!Quest.Comment__c}"/> </apex:column>
    </apex:pageBlockTable> 
    </apex:pageBlockSection>
           <apex:pageBlockSection title="Allocate Transaction Price" columns="3">
           <apex:inputField value="{!RAQ_Header__c.Total_License_Fees_Contract__c}"/>
           <apex:inputField value="{!RAQ_Header__c.Total_License_Fees_Retail_List__c}"/>
           <apex:inputField value="{!RAQ_Header__c.Revenue_Recognition_Method__c}" />
          </apex:pageBlockSection><br/>
         <apex:outputPanel id="Refresh">
            
          <apex:pageBlockSection columns="5" id="xy">
              <apex:outputText style="font-weight:600" value="Performance Obligation"/>
              <apex:outputText style="font-weight:600" value="Stated Value"/>
              <apex:outputText style="font-weight:600" value="SSP Range"/>
              <apex:outputText style="font-weight:600" value="SSP Estimate"/>
              <apex:outputText style="font-weight:600" value="Allocated Value"/>
              <apex:outputText style="font-weight:600" value="Perpetual License"/>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Perpetual_License_Stated_Value__c}"/></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem helpText="Please enter account name"><apex:inputText title="Provide a minimum/maximum discount range for this item. For example Perpetual license - 95% off of list minimum to 525% of list maximum" value="{!RAQ_Header__c.Perpetual_License_SSP_Range__c}"></apex:inputText></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Perpetual_License_SSP_Estimate__c}"/></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Perpetual_License_Allocated_Value__c}"/></apex:pageBlockSectionItem>
              <apex:outputText style="font-weight:600" value="Maintenance"/>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Maintenance_Stated_Value__c}"/></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem ><apex:inputText title="Provide a minimum/maximum discount range for this item. For example 'Perpetual license - 95% off of list minimum to 525% of list maximum'" value="{!RAQ_Header__c.Maintenance_SSP_Range__c}"/></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Maintenance_SSP_Estimate__c}"/></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Maintenance_Allocated_Value__c}"/></apex:pageBlockSectionItem>
              <apex:outputText value=""/>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Total_Stated_Value__c}"/></apex:pageBlockSectionItem>
              <apex:outputText value=""/>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Total_SSP_Estimate__c}"/></apex:pageBlockSectionItem>
              <apex:outputText value=""/>
              <apex:outputText value=""/>
              <apex:outputText style="font-weight:700" value="Total Stated Value"/>
              <apex:outputText value="" />
              <apex:outputText style="font-weight:700" value="Total SSP Estimate"/>
              <apex:outputText value=""/>          
          </apex:pageBlockSection>
           
          </apex:outputPanel>
<apex:pageblockbuttons >        
<div align="right" draggable="false" class="slds-button-group" role="group">
   
    <apex:commandButton styleclass="btn btn-primary" Action="{!Save}" value="Save" rerender="Refresh" />
       <apex:commandButton styleclass="btn btn-primary" Action="{!Cancel}" Value="Cancel"/>
                   
       </div>
          </apex:pageblockbuttons>
          </apex:pageBlock>
             </apex:form>  
</apex:page>


Thanks in Advance

 
Object RAQ_Header__c is parent of RAQ_Question__c object. RAQ_Question related list contains list of questions that has been retrieved by a custom metadata using Trigger after insertion of RAQ_Header__c. Here I am trying to fetch the different set of question to display into different section. Can you please suggest a way to optimise the code to reduce SOQL Used -

Public with sharing class myRAQExtension {
  
    private final RAQ_Header__c raq;
    list<RAQ_Question__c> Quests;
    list<RAQ_Question__c> Quests2;
    list<RAQ_Question__c> Quests3;
    list<RAQ_Question__c> Quests4;
    list<RAQ_Question__c> Quests5;list<RAQ_Question__c> Quests6;
    list<RAQ_Question__c> Quests7;list<RAQ_Question__c> Quests8;
    list<RAQ_Question__c> Quests9;list<RAQ_Question__c> Quests10;list<RAQ_Question__c> Quests11;
    list<RAQ_Question__c> Ques= new list<RAQ_Question__c>();
    public myRAQExtension(ApexPages.StandardController stdController) {
        this.raq = (RAQ_Header__c)stdController.getRecord(); 
        Quests=[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c < 4 and Header__c=:raq.id];
        Quests2 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 4 and SR__c <= 5 and Header__c=:raq.id];
        Quests3 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 6 and SR__c <= 11 and Header__c=:raq.id];
        Quests4 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 12 and SR__c <= 14 and Header__c=:raq.id];
        Quests5 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 15 and SR__c <= 16 and Header__c=:raq.id];
        Quests6 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 17 and SR__c <= 18 and Header__c=:raq.id];
        Quests7 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 19 and SR__c <= 20 and Header__c=:raq.id];
        Quests8 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 21 and SR__c <= 22 and Header__c=:raq.id];
        Quests9 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 23 and SR__c <= 24 and Header__c=:raq.id];
        Quests10 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 25 and SR__c <= 30 and Header__c=:raq.id];
        Quests11 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 31 and SR__c <= 36 and Header__c=:raq.id];
        Ques.addAll(Quests);
        Ques.addAll(Quests2);
        Ques.addAll(Quests3);
        Ques.addAll(Quests4);Ques.addAll(Quests5);Ques.addAll(Quests6);Ques.addAll(Quests7);Ques.addAll(Quests8);Ques.addAll(Quests9);Ques.addAll(Quests10);
        Ques.addAll(Quests11);
       
    }
    public list<RAQ_Question__c> getQuests() {       
        return Quests;
    }
    public list<RAQ_Question__c> getQuests2() {       
        return Quests2;
    }
     public list<RAQ_Question__c> getQuests3() {       
        return Quests3;
    }
    public list<RAQ_Question__c> getQuests4() {       
        return Quests4;
    }
       public list<RAQ_Question__c> getQuests5() {       
        return Quests5;
       }
    public list<RAQ_Question__c> getQuests6() {       
        return Quests6;
       }
    public list<RAQ_Question__c> getQuests7() {       
        return Quests7;
       }
    public list<RAQ_Question__c> getQuests8() {       
        return Quests8;
       }
    public list<RAQ_Question__c> getQuests9() {       
        return Quests9;
       }
    public list<RAQ_Question__c> getQuests10() {       
        return Quests10;
       }
        public list<RAQ_Question__c> getQuests11() {       
        return Quests11;
       }
  
   
public pagereference save(){  
 try{
 update Ques;
 update raq;
     ApexPages.addMessage(new ApexPages.message(
        ApexPages.SEVERITY.Confirm,
        'Record successfully saved'
    ));             
}
catch (Exception ex) { 
        ex.getMessage();
}     
return null;
}
}
How to create matrix view with each element having different formula to display the value. The deail page/ VF page should be like this -
User-added imagePlease guide me to build this into standard /VF page .
Thanks in Advance. 
Do we have  row filtering capability in Lightning datatable/iteration as we filter rows in excel ? Please help.
I am trying to build a custom component using <aura:iteration>  and add the rowaction "Add" and "View" ,which will take the user to "Add New Campaign member" and 'View related Campaign Member " respectively for each campaign record. Something like this -

User-added image
Server Side Controller :-

public class MarketingCampaignController {
    @AuraEnabled
    public static List<Campaign> CampaignsSOQL(string searchString) {
        String queryString = 'Select id, name,type,status from Campaign ';
        if(searchString!=null && searchString!=''){
            searchString = '%'+string.escapeSingleQuotes(searchString)+'%'; 
            queryString = queryString+ 'where Name Like:searchString';
        }
        queryString = queryString + ' Limit 10000';
        List<Campaign> campList = database.query(queryString);
        
        return campList;
    }
}

Component :-

<aura:component controller="MarketingCampaignController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <aura:attribute name="campList" type="Object"/>
     <aura:attribute name="accSearchValue" type="String" default=""/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <div class="slds-card">
        <div class="slds-card__header slds-grid">
            <header class="slds-media slds-media_center slds-has-flexi-truncate">
                <div class="slds-media__figure">
                    <lightning:Icon iconName="standard:account"  size="Medium" 
                             class="slds-icon slds-input__icon slds-input__icon_right " />
                </div>
                <div class="slds-media__body">
                    <h2><span class="slds-text-heading_medium">Marketing Campaigns</span></h2>
                </div>
            </header>
            <div class="slds-no-flex">
                <div class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
                    <lightning:input value="{!v.accSearchValue}" placeholder="Search" type="text" label="" name="Campaign Search" onchange="{!c.doInit}"/>
                </div>        
            </div>
        </div>
        
        <table class="slds-table slds-table_bordered slds-table_cell-buffer">       
    <thead>
        <tr class="slds-text-title_caps"> 
            <th scope="col">
                <div class="slds-truncate" title="Name"></div>
            </th>
            <th scope="col">
                <div class="slds-truncate" title="Name"></div>
            </th>           
           <th scope="col">
                <div class="slds-truncate" title="Name">Name</div>
            </th>       
            <th scope="col">
                <div class="slds-truncate" title="Approver">Type</div>
            </th>
            <th scope="col">
                <div class="slds-truncate" title="Approver">StartDate</div>
            </th>
            <th scope="col">
                <div class="slds-truncate" title="Approver">Status</div>
            </th>   
        </tr>
    </thead>
    <tbody> 
        <!--### display all records of searchResult attribute by aura:iteration ###-->
        <aura:iteration items="{!v.campList}" var="camp" indexVar="count" >
            <tr>
                <td>
            {!count + 1}
        </td>       
           <td>
                 <div class="slds-align_absolute-center slds-p-top_small">
                <lightning:button variant="success"  label="View" title="Brand action" onclick="{!c.view}" />
            &nbsp;&nbsp;<lightning:button variant="success" label="Add" title="Brand action" onclick="{!c.Add}" />
            </div>
                </td>
               <td >
                    <div class="slds-truncate">{!camp.Name}</div>
                </td>
                
                <td>
                    <div class="slds-truncate">{!camp.Type}</div>
                </td>
                <td >
                    <div class="slds-truncate">{!camp.StartDate}</div>
                </td>
                <td>
                    <div class="slds-truncate">{!camp.Status}</div>
                </td> 
            </tr>
        </aura:iteration>     
    </tbody>
</table>
        </div>
        <footer class="slds-card__footer"></footer>              
</aura:component>


How to implement those Rowaction buttons ? Kindly help.
Controller code:
component.set('v.columns', [ { label: 'formulafield', fieldName: 'formulafield__c', type: 'text', initialWidth: 350, editable: false, sortable :true }, ]);

Formula field :
IMAGE('/sfc/servlet.shepherd/version/download/'+Campaign_Image_Content_Version_ID__c, 'Preview of Marketing Campaign',200 ,-50)

out put in the lightning component:
<img src="/sfc/servlet.shepherd/version/download/" alt="Preview of Marketing Campaign" style="height:200px; width:-50px;" border="0"/>

The above code is displaying the URL in the lightning dataTable instead of the actual image. Image is choosen according to different criteria in the formula field. I need to show the actual image instead of the URL. Please help .

 
I am trying to create related conact to an account passing the accountid into the url,url heck doesn't work properly when JS hits the url and opens a new window ' Account name doesn't auto populate in the new contact window in Lightning'-

https://dharmendraex-dev-ed.lightning.force.com/lightning/o/Contact/new?Accountid=0017F00000C34HOQAZ

Am I missing something? Please help me out on this .
 
I am trying to create related conact to an account passing the accountid into the url,url heck doesn't work properly when JS hits the url and opens a new window ' Account name doesn't auto populate in the new contact window in Lightning'-

https://dharmendraex-dev-ed.lightning.force.com/lightning/o/Contact/new?Accountid=0017F00000C34HOQAZ

Am I missing something? Please help me out on this .
 
I need help to create custom button for cloning the Case using lightning Web component . I pretty new to lightning , can somebody please guide me ?
Thanks !
Not Able to Rerender Outputpanel/Pageblocksection on Save action.
Please advise on this -

<apex:page standardcontroller="RAQ_Header__c" extensions="myRAQExtension">
    <apex:pagemessages />
    <apex:form > 
      <apex:pageBlock >         
    <apex:pageBlockSection title="Contract Identification" columns="2">
           <apex:inputField value="{!RAQ_Header__c.name}"/>
          <apex:inputField value="{!RAQ_Header__c.Review_Status__c}"/>
           <apex:inputField value="{!RAQ_Header__c.Opportunity__c}"/>
   
          </apex:pageBlockSection>
       <apex:pageBlockSection columns="1">  
<apex:variable var="rowNum" value="{!0}"/> 
   
    <apex:pageBlockTable value="{!Quests}" var="Quest">
      <apex:column headerValue="Sr No.">
                     <apex:variable var="rowNum" value="{!rowNum + 1}"/>
                     {!rowNum}
                 </apex:column>
      <apex:column value="{!Quest.Question__c}"/>
       <apex:column headerValue=" Your Answer"><apex:inputfield value="{!Quest.Select_Answer__c}"/></apex:column>
       <apex:column headerValue="Comment"><apex:inputfield value="{!Quest.Comment__c}"/> </apex:column>
    </apex:pageBlockTable> 
    </apex:pageBlockSection>
           <apex:pageBlockSection title="Allocate Transaction Price" columns="3">
           <apex:inputField value="{!RAQ_Header__c.Total_License_Fees_Contract__c}"/>
           <apex:inputField value="{!RAQ_Header__c.Total_License_Fees_Retail_List__c}"/>
           <apex:inputField value="{!RAQ_Header__c.Revenue_Recognition_Method__c}" />
          </apex:pageBlockSection><br/>
         <apex:outputPanel id="Refresh">
            
          <apex:pageBlockSection columns="5" id="xy">
              <apex:outputText style="font-weight:600" value="Performance Obligation"/>
              <apex:outputText style="font-weight:600" value="Stated Value"/>
              <apex:outputText style="font-weight:600" value="SSP Range"/>
              <apex:outputText style="font-weight:600" value="SSP Estimate"/>
              <apex:outputText style="font-weight:600" value="Allocated Value"/>
              <apex:outputText style="font-weight:600" value="Perpetual License"/>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Perpetual_License_Stated_Value__c}"/></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem helpText="Please enter account name"><apex:inputText title="Provide a minimum/maximum discount range for this item. For example Perpetual license - 95% off of list minimum to 525% of list maximum" value="{!RAQ_Header__c.Perpetual_License_SSP_Range__c}"></apex:inputText></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Perpetual_License_SSP_Estimate__c}"/></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Perpetual_License_Allocated_Value__c}"/></apex:pageBlockSectionItem>
              <apex:outputText style="font-weight:600" value="Maintenance"/>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Maintenance_Stated_Value__c}"/></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem ><apex:inputText title="Provide a minimum/maximum discount range for this item. For example 'Perpetual license - 95% off of list minimum to 525% of list maximum'" value="{!RAQ_Header__c.Maintenance_SSP_Range__c}"/></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Maintenance_SSP_Estimate__c}"/></apex:pageBlockSectionItem>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Maintenance_Allocated_Value__c}"/></apex:pageBlockSectionItem>
              <apex:outputText value=""/>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Total_Stated_Value__c}"/></apex:pageBlockSectionItem>
              <apex:outputText value=""/>
              <apex:pageBlockSectionItem ><apex:inputField value="{!RAQ_Header__c.Total_SSP_Estimate__c}"/></apex:pageBlockSectionItem>
              <apex:outputText value=""/>
              <apex:outputText value=""/>
              <apex:outputText style="font-weight:700" value="Total Stated Value"/>
              <apex:outputText value="" />
              <apex:outputText style="font-weight:700" value="Total SSP Estimate"/>
              <apex:outputText value=""/>          
          </apex:pageBlockSection>
           
          </apex:outputPanel>
<apex:pageblockbuttons >        
<div align="right" draggable="false" class="slds-button-group" role="group">
   
    <apex:commandButton styleclass="btn btn-primary" Action="{!Save}" value="Save" rerender="Refresh" />
       <apex:commandButton styleclass="btn btn-primary" Action="{!Cancel}" Value="Cancel"/>
                   
       </div>
          </apex:pageblockbuttons>
          </apex:pageBlock>
             </apex:form>  
</apex:page>


Thanks in Advance

 
Object RAQ_Header__c is parent of RAQ_Question__c object. RAQ_Question related list contains list of questions that has been retrieved by a custom metadata using Trigger after insertion of RAQ_Header__c. Here I am trying to fetch the different set of question to display into different section. Can you please suggest a way to optimise the code to reduce SOQL Used -

Public with sharing class myRAQExtension {
  
    private final RAQ_Header__c raq;
    list<RAQ_Question__c> Quests;
    list<RAQ_Question__c> Quests2;
    list<RAQ_Question__c> Quests3;
    list<RAQ_Question__c> Quests4;
    list<RAQ_Question__c> Quests5;list<RAQ_Question__c> Quests6;
    list<RAQ_Question__c> Quests7;list<RAQ_Question__c> Quests8;
    list<RAQ_Question__c> Quests9;list<RAQ_Question__c> Quests10;list<RAQ_Question__c> Quests11;
    list<RAQ_Question__c> Ques= new list<RAQ_Question__c>();
    public myRAQExtension(ApexPages.StandardController stdController) {
        this.raq = (RAQ_Header__c)stdController.getRecord(); 
        Quests=[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c < 4 and Header__c=:raq.id];
        Quests2 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 4 and SR__c <= 5 and Header__c=:raq.id];
        Quests3 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 6 and SR__c <= 11 and Header__c=:raq.id];
        Quests4 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 12 and SR__c <= 14 and Header__c=:raq.id];
        Quests5 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 15 and SR__c <= 16 and Header__c=:raq.id];
        Quests6 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 17 and SR__c <= 18 and Header__c=:raq.id];
        Quests7 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 19 and SR__c <= 20 and Header__c=:raq.id];
        Quests8 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 21 and SR__c <= 22 and Header__c=:raq.id];
        Quests9 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 23 and SR__c <= 24 and Header__c=:raq.id];
        Quests10 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 25 and SR__c <= 30 and Header__c=:raq.id];
        Quests11 =[select Question__c,SR__c,Select_Answer__c,Comment__c from RAQ_Question__c where SR__c >= 31 and SR__c <= 36 and Header__c=:raq.id];
        Ques.addAll(Quests);
        Ques.addAll(Quests2);
        Ques.addAll(Quests3);
        Ques.addAll(Quests4);Ques.addAll(Quests5);Ques.addAll(Quests6);Ques.addAll(Quests7);Ques.addAll(Quests8);Ques.addAll(Quests9);Ques.addAll(Quests10);
        Ques.addAll(Quests11);
       
    }
    public list<RAQ_Question__c> getQuests() {       
        return Quests;
    }
    public list<RAQ_Question__c> getQuests2() {       
        return Quests2;
    }
     public list<RAQ_Question__c> getQuests3() {       
        return Quests3;
    }
    public list<RAQ_Question__c> getQuests4() {       
        return Quests4;
    }
       public list<RAQ_Question__c> getQuests5() {       
        return Quests5;
       }
    public list<RAQ_Question__c> getQuests6() {       
        return Quests6;
       }
    public list<RAQ_Question__c> getQuests7() {       
        return Quests7;
       }
    public list<RAQ_Question__c> getQuests8() {       
        return Quests8;
       }
    public list<RAQ_Question__c> getQuests9() {       
        return Quests9;
       }
    public list<RAQ_Question__c> getQuests10() {       
        return Quests10;
       }
        public list<RAQ_Question__c> getQuests11() {       
        return Quests11;
       }
  
   
public pagereference save(){  
 try{
 update Ques;
 update raq;
     ApexPages.addMessage(new ApexPages.message(
        ApexPages.SEVERITY.Confirm,
        'Record successfully saved'
    ));             
}
catch (Exception ex) { 
        ex.getMessage();
}     
return null;
}
}
I am trying to build a custom component using <aura:iteration>  and add the rowaction "Add" and "View" ,which will take the user to "Add New Campaign member" and 'View related Campaign Member " respectively for each campaign record. Something like this -

User-added image
Server Side Controller :-

public class MarketingCampaignController {
    @AuraEnabled
    public static List<Campaign> CampaignsSOQL(string searchString) {
        String queryString = 'Select id, name,type,status from Campaign ';
        if(searchString!=null && searchString!=''){
            searchString = '%'+string.escapeSingleQuotes(searchString)+'%'; 
            queryString = queryString+ 'where Name Like:searchString';
        }
        queryString = queryString + ' Limit 10000';
        List<Campaign> campList = database.query(queryString);
        
        return campList;
    }
}

Component :-

<aura:component controller="MarketingCampaignController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <aura:attribute name="campList" type="Object"/>
     <aura:attribute name="accSearchValue" type="String" default=""/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <div class="slds-card">
        <div class="slds-card__header slds-grid">
            <header class="slds-media slds-media_center slds-has-flexi-truncate">
                <div class="slds-media__figure">
                    <lightning:Icon iconName="standard:account"  size="Medium" 
                             class="slds-icon slds-input__icon slds-input__icon_right " />
                </div>
                <div class="slds-media__body">
                    <h2><span class="slds-text-heading_medium">Marketing Campaigns</span></h2>
                </div>
            </header>
            <div class="slds-no-flex">
                <div class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
                    <lightning:input value="{!v.accSearchValue}" placeholder="Search" type="text" label="" name="Campaign Search" onchange="{!c.doInit}"/>
                </div>        
            </div>
        </div>
        
        <table class="slds-table slds-table_bordered slds-table_cell-buffer">       
    <thead>
        <tr class="slds-text-title_caps"> 
            <th scope="col">
                <div class="slds-truncate" title="Name"></div>
            </th>
            <th scope="col">
                <div class="slds-truncate" title="Name"></div>
            </th>           
           <th scope="col">
                <div class="slds-truncate" title="Name">Name</div>
            </th>       
            <th scope="col">
                <div class="slds-truncate" title="Approver">Type</div>
            </th>
            <th scope="col">
                <div class="slds-truncate" title="Approver">StartDate</div>
            </th>
            <th scope="col">
                <div class="slds-truncate" title="Approver">Status</div>
            </th>   
        </tr>
    </thead>
    <tbody> 
        <!--### display all records of searchResult attribute by aura:iteration ###-->
        <aura:iteration items="{!v.campList}" var="camp" indexVar="count" >
            <tr>
                <td>
            {!count + 1}
        </td>       
           <td>
                 <div class="slds-align_absolute-center slds-p-top_small">
                <lightning:button variant="success"  label="View" title="Brand action" onclick="{!c.view}" />
            &nbsp;&nbsp;<lightning:button variant="success" label="Add" title="Brand action" onclick="{!c.Add}" />
            </div>
                </td>
               <td >
                    <div class="slds-truncate">{!camp.Name}</div>
                </td>
                
                <td>
                    <div class="slds-truncate">{!camp.Type}</div>
                </td>
                <td >
                    <div class="slds-truncate">{!camp.StartDate}</div>
                </td>
                <td>
                    <div class="slds-truncate">{!camp.Status}</div>
                </td> 
            </tr>
        </aura:iteration>     
    </tbody>
</table>
        </div>
        <footer class="slds-card__footer"></footer>              
</aura:component>


How to implement those Rowaction buttons ? Kindly help.
Controller code:
component.set('v.columns', [ { label: 'formulafield', fieldName: 'formulafield__c', type: 'text', initialWidth: 350, editable: false, sortable :true }, ]);

Formula field :
IMAGE('/sfc/servlet.shepherd/version/download/'+Campaign_Image_Content_Version_ID__c, 'Preview of Marketing Campaign',200 ,-50)

out put in the lightning component:
<img src="/sfc/servlet.shepherd/version/download/" alt="Preview of Marketing Campaign" style="height:200px; width:-50px;" border="0"/>

The above code is displaying the URL in the lightning dataTable instead of the actual image. Image is choosen according to different criteria in the formula field. I need to show the actual image instead of the URL. Please help .