• Flint Lockwood
  • NEWBIE
  • 150 Points
  • Member since 2013

  • Chatter
    Feed
  • 3
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 35
    Questions
  • 39
    Replies
Hi, 

I have created a controller that would query some information from a custom child object so I can use it from its parent object. These two objects have a master-detail relationship.  

Parent/master object: Media_Plan__c
Child/detailed object: Media_Deliverable__c

I need to have a visualforce page that renders as PDF in Media_Plan__c layout. This page would get triggered with a button on the layout, this pdf page would get some information from Media_Plan__c and from its child object Media_Deliverable__c. I need some help with this page, how can I apply my controller to achieve this? I was thinking of using apex:repeat, but not sure how to apply this.   

The following is my controller -
 
public with sharing class Abc {
    public List<Media_Deliverable__c > childLs{get;set;}
    
    public Abc(ApexPages.StandardController controller) {
        
      	childLs= new List<Media_Deliverable__c >();
        id parId = ApexPages.currentPage().getParameters().get('id');

      	childLs = [select id, Deliverable_Name__c, Product__c, Product_copy__c, 
		Quantity__c, Rate__c, True_Total_Value__c, Value__c, Value_Add__c,
		Value_add_price__c from Media_Deliverable__c where Media_Plan__c = :parId ];
    }
}
  • December 20, 2016
  • Like
  • 0

 

this query returns the sum of all the tasks on Sales_Resources__c object...but i want to get the sum of closed tasks of particular record...

if object has 5 records and record 1 contain 2 closed tasks..then i want to get the sum of only those two tasks...

\but this query returning the sum of all the tasks of this object's records...

can sm1 help...

 

aggregateResult[] results  = [Select SUM(Minutes_on_tasks__c)summ From Task WHERE status = 'Completed' AND Minutes_on_tasks__c != null AND whatid IN (SELECT Id FROM Sales_Resources__c)];

Is it possible to schedule a job from a scheduled job? I tried this but kept getting the "The Apex job is already scheduled for execution".
Hi,

Is is possible to create a Lightning component to listen in on the result of a Lightning action? For instance, if the Lightning action creates a Task, the Lightning component can listen and interpret that a Task was created and then display a message.
Hi,

Is it possible to use merge fields in custom success messages in Lightning?
Are there any notifications that Omnichannel send when no agents are available and a Case is sitting in the queue?
Omnichannel allows us to set the routing prority for each Routing Configuration. What happens when two routing configurations are set to the same prority? Which one does Omnichannel route first?
Is there any notification when an agent uses the "Request for Assistance" button in Live Agent
Does anyone know what object the "Seen By" values are stored in? User-added image
Is it possible to create Chatter post with macros? The option is currently not selectable for me.
I created an action on the Case object. When I added it to the page layout under the "Salesforce Mobile and Lightning Experience Actions" section, it adds it to the Case feed view. I want the action to appear next to the standard button such as Edit, Change Owner, etc. Please advise.
I am trying to create a Chatter post for an Entitlement Process action. The action should create Chatter post 5 minutes before the milestone expiration. I have created a field update for the Entitlement Process action and then a Process Builder action to create a Chatter post whenever the field is updated. I can see the field being updated correctly. However, the Process Builder action is not being called. I have verified this using the debug log. Please advise.
Is anyone else having trouble finding the Lightning component documentation, the one that lists all the tags and it's attributes?
Does anyone know if the following interface selecting data categories while creating a knowledge article exist in Lightning?

User-added image
Does anyone know if you can pass a list variable between components using the navigatetoComponent function? I tried passing a list of strings, but was unable to do so.
I am using Lightning:Datatable to display a list of records. I specified "maxRowSelection=1", so the table is display radio buttons instead of checkboxes. I am also using the sort function detailed in the documentation. https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_datatable.htm.

If I select a record then sort, the radio buttons are greyed out and I cannot change my selection.
If I sort before I select a record, everything works.

Any idea whats going on here?
Anyone have a good way to query the UserServicePresence object? This object creates multiple records per agent per day. I only need to query the most recent record. 
I created a wrapper class that implements the Comparable interface. However, when I sort the list of wrapper, the list is still sorting by the name
 
public with sharing class SampleSort implements Comparable{
	
	private Goal__c goalRecord;

	public CaseSLAWrapperClass(Goals__c s) {
              goalRecord = s;
	}

	public Integer compareTo(Object compareTo)
	{
		SampleSort compareToGoal = (SampleSort)compareTo;

		if(goalRecord.Display_Order__c < compareToGoal.goalRecord.Display_Order__c)
			return 1;
		else if (goalRecord.Display_Order__c < compareToGoal.goalRecord.Display_Order__c)
			return -1;
		else
			return 0;
	}
}

 
On my Visualforce page (which is displayed in Service Console), I created a JS function using the Service Cloud toolkit. This function opens a primary tab with a list view. I added "isdtp=nv" as part of the URL. However, when the tab loads, the URL is changed to "isdtp=vw". This affects the way that the list view looks. Any idea what's causing this? Thank you!
Is it possible to update the Case Owner to a queue using the Process Builder? I keep getting the following error:
User-added image
I don't see the following options for some of my users. Does anyone know where I can enable the following settings?

User-added image
Is there a way to redirect to a Lighting Component from a Visualforce Page and pass in attribute values?
Is there a way for one component to reference the functions in another without embedding?

If I have to embed the component, how do I reference there parent function from a  child component and vice versa?
I am using the spinner from Salesforce Lightning Design System. The spinner displays on inital page load. However, the spinner never disappears. I am using the aura:waiting and aura:doneWaiting event to call the following controllor logic respectively.
showSpinner : function (component, event, helper) {
       var spinner = component.find('spinner');        
       $A.util.toggleClass(spinner, "toggle") ;  
    },
    
    hideSpinner : function (component, event, helper) {
       var spinner = component.find('spinner');
        $A.util.toggleClass(spinner, "toggle")   
    },
Please let me know what I am doing wrong. 
 
I created an action on the Case object. When I added it to the page layout under the "Salesforce Mobile and Lightning Experience Actions" section, it adds it to the Case feed view. I want the action to appear next to the standard button such as Edit, Change Owner, etc. Please advise.
I am trying to create a Chatter post for an Entitlement Process action. The action should create Chatter post 5 minutes before the milestone expiration. I have created a field update for the Entitlement Process action and then a Process Builder action to create a Chatter post whenever the field is updated. I can see the field being updated correctly. However, the Process Builder action is not being called. I have verified this using the debug log. Please advise.
Is anyone else having trouble finding the Lightning component documentation, the one that lists all the tags and it's attributes?
I have written a first test class for AuraEnabled Lightning controller but code is not covering for the class.
Please check my code in code sample and suggest me.
Class:
public class ctssupportform {
    
    public static List<Attachment> attachments;
    public static final Integer DEFAULT_ATTACHMENT_NO=1;
    public String sobjId {get; set;}
    public String Appname{get; set;}
    public static Map<String, BMCServiceDesk__Category__c> catMap ;
    
    @AuraEnabled
    public static id Savesupportform(Case casedata, String fileName, String base64Data, String contentType){

        id RcrdTypeid= Schema.Sobjecttype.Case.getRecordTypeInfosByName().get('Agent Helpdesk').getRecordTypeId();
        System.debug('Casedata@@@@@@@@@@@@@@'+RcrdTypeid);
        Casedata.recordtypeid=RcrdTypeid;//'0120U0000000Aju';
        
        System.debug('Casedata@@@@@@@@@@@@@@'+Casedata);
        insert Casedata; 
        System.debug('Casedata@@@@@@@@@@@@@@'+Casedata);
        List<BMCServiceDesk__Category__c> lstcat = [Select Id,Name from BMCServiceDesk__Category__c limit 50000];
        
        catMap = new Map<String, BMCServiceDesk__Category__c>();
        
        for (BMCServiceDesk__Category__c c : lstcat ){
            catMap.put(c.Name, c);
            
        }  
        System.debug('catMap@@@@@@@@@@@@@@'+catMap);  
        
        List<BMCServiceDesk__Impact__c> lstimp = [Select Id,Name from BMCServiceDesk__Impact__c limit 4];
        
        Map<String, BMCServiceDesk__Impact__c> impmap = new Map<String, BMCServiceDesk__Impact__c>();
        
        for (BMCServiceDesk__Impact__c i : lstimp){
            impmap.put(i.Name, i);
            
        }  
        System.debug('impmap@@@@@@@@@@@@@@'+impmap);           
        
        List<BMCServiceDesk__Urgency__c> lsturg = [Select Id,Name from BMCServiceDesk__Urgency__c limit 4];
        
        Map<String, BMCServiceDesk__Urgency__c> urgmap = new Map<String, BMCServiceDesk__Urgency__c>();
        
        for (BMCServiceDesk__Urgency__c u : lsturg){
            urgmap.put(u.Name, u);
            
        }
        
           
        List<User> lstuser = [Select Id,Name from user limit 50000];
        
        Map<String, User> usermap = new Map<String, User>();
        
        for (User u1 : lstuser){
            usermap.put(u1.Name, u1);
            
        }     
              
        System.debug('urgmap@@@@@@@@@@@@@@'+usermap);
        
        System.debug('@@@@@@@@@@@@@@@@'+Casedata);
        base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8');
        System.debug('@@@@@@@@@@@@@@@@'+base64Data );
        //base64Data = 'Test';
        Attachment oAttachment = new Attachment();
        oAttachment.parentId = casedata.id;
        oAttachment.Body = EncodingUtil.base64Decode(base64Data);        
        oAttachment.Name = fileName;
        oAttachment.ContentType = contentType;
        insert oAttachment; 
        
        BMCServiceDesk__Incident__c inc = new BMCServiceDesk__Incident__c();
        inc.Cases__c = casedata.id;
        inc.BMCServiceDesk__incidentDescription__c = casedata.Type_Of_Ticket__c;
        
        string newlowerstringcategory = (casedata.Applications__c).trim();
        System.debug('newlowerstringcategory@@@'+ newlowerstringcategory);
        system.debug('catMap.get(newlowerstringcategory)   '+catMap.get(newlowerstringcategory));
        if(catMap.get(newlowerstringcategory)!= null) {       
            inc.BMCServiceDesk__FKCategory__c  = catMap.get(newlowerstringcategory).id;
            System.debug('1111111111111111'+ catMap.get(newlowerstringcategory));
            System.debug('11111111111111111'+ inc.BMCServiceDesk__FKCategory__c);
        }

        string newlowerstringuser = casedata.OwnerId;
          System.debug('11111111111111111'+ newlowerstringuser);
            if(usermap.get(newlowerstringuser)!= null) {       
            inc.BMCServiceDesk__FKClient__c= usermap.get(newlowerstringuser).id;
            System.debug('1111111111111111'+ usermap.get(newlowerstringuser));
            System.debug('11111111111111111'+ inc.BMCServiceDesk__FKClient__c);
        }
        
        //inc.BMCServiceDesk__FKClient__c = casedata.OwnerId;
        
        inc.BMCServiceDesk__Service_Request_Title__c = casedata.Subject;
        System.debug('11111111111111111'+ inc.BMCServiceDesk__Service_Request_Title__c);
        
        string newlowerstringImpact = casedata.Impact__c.touppercase();
        System.debug('newlowerstringImpact '+ newlowerstringImpact );
        
        if(impmap.get(newlowerstringImpact) != null)        
            inc.BMCServiceDesk__FKImpact__c = impmap.get(newlowerstringImpact).id;
        System.debug('impmap_getnewlowerstringImpact_id'+ impmap.get(newlowerstringImpact).id );
        System.debug('11111111111111111'+ inc.BMCServiceDesk__FKImpact__c);
        
        
        string newupperstringUrgency = casedata.Urgency__c.touppercase();
        System.debug('newupperstringUrgency '+ newupperstringUrgency );
        if(urgmap.get(newupperstringUrgency) != null)
            inc.BMCServiceDesk__FKUrgency__c= urgmap.get(newupperstringUrgency).id;
        System.debug('11111111111111111'+ inc.BMCServiceDesk__FKUrgency__c);
        
        inc.BMCServiceDesk__incidentDescription__c= casedata.Description +' '+casedata.Type_Of_Ticket__c+' '+casedata.Justification__c;
        //inc.BMCServiceDesk__incidentDescription__c= casedata.Justification__c ;
        insert inc;
        System.debug('@@@@@@@@@@@@@@@@@@@@'+inc);
        
        Attachment oAttachment1 = new Attachment();
        oAttachment1.parentId = inc.id;
        oAttachment1.Body = EncodingUtil.base64Decode(base64Data);        
        oAttachment1.Name = fileName;
        oAttachment1.ContentType = contentType;
        insert oAttachment1; 
        System.debug('@@@@@@@@@@@@@@@@@@@@'+oAttachment1); 
        
        return casedata.id;
    }
}

Test Class :

@IsTest
Private class Test_ctssupportform
{
   @IsTest
    static void Savesupportform(){  
    
       Case cs  = new Case();
      
        cs.Status = 'open';
        cs.Helpdesk_Case_Resolution__c = 'Test 123';
        cs.Helpdesk_Case_Status__c = 'Closed';
        cs.Incident_Owner__c = 'Naveen';
        cs.Incident_Number__c  = '12345';
        Insert cs;
        
        
        Attachment attach=new Attachment();     
        attach.Name='Unit Test Attachment';
        Blob bodyBlob=Blob.valueOf('Unit Test Attachment Body');
        attach.body=bodyBlob;
        attach.parentId=cs.id;
        insert attach;
        
        List<Attachment> attachments=[select id, name from Attachment where parent.id=:cs.id];
        System.assertEquals(1, attachments.size()); 
        
        //ctssupportform ct = new ctssupportform(cs);
                 
    
    }   
}

Thanks in Advance...
Hi Everyone

how we can redirect to edit page  after double click on field in page. 

Thanks in advance
Anyone have a good way to query the UserServicePresence object? This object creates multiple records per agent per day. I only need to query the most recent record. 
I have several Related Lists which are on the Page Layout for Account.  I would like to programatically add an additional Related List to the Page Layout for Account through Apex alone.  Is that possible?
 
I don't see the following options for some of my users. Does anyone know where I can enable the following settings?

User-added image
I have an iframe embedded within a Lightning page. Whenever the page loads, instead of loading the iframe, the page is redirected to the iframe URL instead. Does anyone know what's happening here?

Hello Everyone,

I have this VF page that can add new rows of fields and delete a row of fields
User-added image

My problem is when I delete the first record or the top most record and then delete the second record it deletes the last row of records. After I deleted the first record it deletes the wrong rows of fields and then when I delete the first record then click the 'Add Skill' button it displays the wrong information in the row. Please Help me out. Thank you very much. My code is down below.

My VF page:

<apex:page standardController="Employee_Skills__c" extensions="AddContacts1" sidebar="false">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  <apex:form >
    <apex:pageBlock title="Skill" id="pb">
      <apex:pageMessages />      
      <apex:variable var="rowNumber" value="{!0}"/>
        <apex:pageBlockTable id="thetable" title="Employee_Skills__c" var="empski" value="{!empskilist}">
          <apex:column headerValue="No." style="width:20px; text-align:center;" headerClass="centertext">
            <apex:outputText value="{0}" style="text-align:center;">
              <apex:param value="{!rowNumber+1}" />
            </apex:outputText>
          </apex:column>
          <apex:column headerValue="Skill Name" >
            <apex:inputField value="{!empski.Skill_ID__c}"/>
          </apex:column>
          <apex:column headerValue="Proficiency" >
            <apex:inputField value="{!empski.Proficiency__c}"/>
          </apex:column>
          <apex:column headerValue="Skill Type" >
            <apex:inputField value="{!empski.Skill_Type__c}"/>
          </apex:column>
          <apex:column headerValue="Years of Expirience" >
            <apex:inputField value="{!empski.Year_of_Experience__c }"/>
          </apex:column>
          <apex:column headerValue="Action" >
            <apex:commandButton value="Delete" action="{!deleteRow}" reRender="pb" immediate="true">
              <apex:param name="rowIndex" value="{!rowNumber}"/>
            </apex:commandButton>
            <apex:variable var="rowNumber" value="{!rowNumber+1}"/>
          </apex:column>
        </apex:pageBlockTable>
           <div align="center" style="margin-top:10px;">  
              <apex:commandButton action="{!addRow}" value="Add Skill" reRender="pb" immediate="true" />   
           </div>
      <apex:pageBlockButtons >
        <apex:commandButton value="Save" action="{!save}" />
        <apex:commandButton value="Cancel" action="{!cancel}"/>
      </apex:pageBlockButtons>           
    </apex:pageBlock>
  </apex:form>
</apex:page>


My Controller:

 

public class AddContacts1 {
        public Employee_Skills__c empskill;
        public Employee_Skills__c del;
        public List < Employee_Skills__c > addEmpSkiList {get;set;}
        public List < Employee_Skills__c > delEmpSkiList {get;set;}
        public List < Employee_Skills__c > empskilist{get;set;}
        public Integer totalCount {get;set;}
        public Integer rowIndex {get;set;}
        public List < Employee_Skills__c > delEmpSki {get;set;}

        public AddContacts1(ApexPages.StandardController controller) {
                empskill= (Employee_Skills__c) controller.getRecord();
                empskilist= [SELECT Id,Skill_ID__r.Name,Employee_ID__c,Name,Proficiency__c,Skill_Type__c,Year_of_Experience__c FROM Employee_Skills__c WHERE Employee_ID__c =: empskill.Employee_ID__c];
                totalCount = empskilist.size();
                delEmpSkiList = new List < Employee_Skills__c > ();
                delEmpSki = new List < Employee_Skills__c > ();
        }

        public void addRow() {
                addEmpSkiList = new List < Employee_Skills__c > ();
                empskilist.add(new Employee_Skills__c (Id = empskill.Id,Employee_ID__c = empskill.Employee_ID__c));
        }

        public PageReference save() {
                upsert empskilist;
                delete delEmpSkiList ;
                
              return null;
        }
        public void deleteRow() {
                rowIndex = Integer.valueOf(ApexPages.currentPage().getParameters().get('rowIndex'));
                del = empskilist.remove(rowIndex);
                
               // if(del.Id != NULL)
               // {
                    delEmpSkiList.add(del);
              //  }
                  
        }
}

Thank you very much.
public class ZilliantRequestControllerExtn {
    private final Quote__c quot;
    public String worksheetLines {get;set;}
    public String worksheetLine {get;set;}
    public String ln_nbr {get;set;}
    public String bom_nbr {get;set;}
    public String fix_snp_ind {get;set;}
    public Boolean fix_mult{get; set;}
    public Decimal rqstd_ext_snp {get;set;}
    public Decimal qty {get;set;}
    public Decimal tot_var_cost {get; set;}
    public Decimal tot_cost {get; set;}
    public String ext_auth_eqp_snp {get; set;}
    public String ext_estm_mkt_prc {get; set;}
    public Decimal ext_list_prc {get; set;}
    public Decimal ext_norm_net_prc_d {get; set;}
    public String ext_norm_net_prc {get; set;}
    public Decimal ext_prfl_net_prc_d {get; set;}
    public String ext_prfl_net_prc {get; set;}
    public String norm_net_attnmnt {get; set;}
    public Decimal sell_net_mult {get; set;}
    public String catlg_categ_desc {get; set;}
    public String categ_id {get; set;}
    public String categ_desc {get; set;}
    public String co_rev_nbr {get; set;}
    public String deal_id {get; set;}
    public String commit_shp_dt_val {get; set;}
    
    public String orig_norm_net_prc {get; set;}
    public String curr_norm_net_prc {get; set;}
        
    Decimal orig_norm_net_prc_d = 0.0;    
    /** 
    * Class constructor.
    */
    public ZilliantRequestControllerExtn (ApexPages.StandardController stdController) {
        this.quot = (Quote__c)stdController.getRecord();
        Id quotid = quot.Id; 
        List<Quote_Line_Items__c> ExistingItems = [select id, Recommended_Fix__c, Unit_List_Price__c,Normal_Net_Multiplier__c,Line_Item_Number__c,Requested_Extended_Selling_Net_price__c,Quantity__c,Tot_Var_Cost__c,Total_Cost__c,Extended_list_Price__c,Normal_Net_Extended_Price__c,Ext_Prfl_Net_Prc__c,Authorize_Unit_Selling_Net_Price__c,Product_Code__c,Product_Name__r.Name,Price_Determined_Category_Number__c,Categ_Desc__c, QL_Item_No_Formula__c from Quote_Line_Items__c where Quote_Name__r.id =: quotid];
        worksheetLines = '';
        for(Quote_Line_Items__c existing : ExistingItems){
            
            if(existing.Unit_List_Price__c!=NULL && existing.Normal_Net_Multiplier__c!=null && existing.Quantity__c!=NULL){
                orig_norm_net_prc_d = orig_norm_net_prc_d + (existing.Unit_List_Price__c*existing.Normal_Net_Multiplier__c*existing.Quantity__c);
                ext_norm_net_prc_d = existing.Unit_List_Price__c*existing.Normal_Net_Multiplier__c*existing.Quantity__c;
                ext_prfl_net_prc_d = existing.Unit_List_Price__c*existing.Normal_Net_Multiplier__c*existing.Quantity__c;
            }

            worksheetLine = '';
                
            ln_nbr = existing.QL_Item_No_Formula__c;
            worksheetLine = '\"'+ln_nbr+'\"';
            
            bom_nbr = '0';
            worksheetLine = worksheetLine + ','+'\"'+bom_nbr+'\"';
            
            fix_snp_ind = '';
            worksheetLine = worksheetLine + ','+'\"'+fix_snp_ind+'\"';
            
            fix_mult = existing.Recommended_Fix__c;
            worksheetLine = worksheetLine + ','+'\"'+fix_mult+'\"';
            
            rqstd_ext_snp = existing.Requested_Extended_Selling_Net_price__c;
            worksheetLine = worksheetLine + ','+'\"'+String.valueOf(rqstd_ext_snp)+'\"';
            
            qty = existing.Quantity__c;
            worksheetLine = worksheetLine + ','+'\"'+String.valueOf(qty)+'\"';
            
            tot_var_cost = existing.Tot_Var_Cost__c;
            worksheetLine = worksheetLine + ','+'\"'+String.valueOf(tot_var_cost)+'\"';
            
            tot_cost = existing.Total_Cost__c;
            worksheetLine = worksheetLine + ','+'\"'+String.valueOf(tot_cost)+'\"';
            
            ext_auth_eqp_snp = '';
            worksheetLine = worksheetLine + ','+'\"'+ext_auth_eqp_snp+'\"';
            
            ext_estm_mkt_prc = '';
            worksheetLine = worksheetLine + ','+'\"'+ext_estm_mkt_prc+'\"';
            
            ext_list_prc = existing.Extended_list_Price__c;
            worksheetLine = worksheetLine + ','+'\"'+String.valueOf(ext_list_prc)+'\"';
            
            if(ext_norm_net_prc_d>0.0){
                ext_norm_net_prc_d = ext_norm_net_prc_d.setScale(2);
                ext_norm_net_prc = '\"'+String.valueOf(ext_norm_net_prc_d)+'\"';
            }else{
                ext_norm_net_prc = '\"'+'\"';
            }            
            worksheetLine = worksheetLine + ','+ext_norm_net_prc;
            
            if(ext_prfl_net_prc_d>0.0){
                ext_prfl_net_prc_d = ext_prfl_net_prc_d.setScale(2);
                ext_prfl_net_prc = '\"'+String.valueOf(ext_prfl_net_prc_d)+'\"';
            }else{
                ext_prfl_net_prc = '\"'+'\"';
            }
            worksheetLine = worksheetLine + ','+ext_prfl_net_prc;
            
            norm_net_attnmnt = '';
            worksheetLine = worksheetLine + ','+'\"'+norm_net_attnmnt+'\"';
            
            sell_net_mult = 0;
/*
            sell_net_mult = existing.Authorize_Unit_Selling_Net_Price__c;
            if(sell_net_mult>0.0){
                sell_net_mult = sell_net_mult.setScale(2);
           }            
*/
            worksheetLine = worksheetLine + ','+'\"'+String.valueOf(sell_net_mult)+'\"';
            
            catlg_categ_desc = existing.Product_Name__r.Name;
            worksheetLine = worksheetLine + ','+'\"'+catlg_categ_desc+'\"';
            
            categ_id = existing.Price_Determined_Category_Number__c;
            worksheetLine = worksheetLine + ','+'\"'+categ_id+'\"';
            
            categ_desc = existing.Categ_Desc__c;
            worksheetLine = worksheetLine + ','+'\"'+categ_desc+'\"';
            
            co_rev_nbr = '0';
            worksheetLine = worksheetLine + ','+'\"'+co_rev_nbr+'\"';
            
            deal_id = '';
            worksheetLine = worksheetLine + ','+'\"'+deal_id+'\"';
            
            commit_shp_dt_val = '1';
            worksheetLine = worksheetLine + ','+'\"'+commit_shp_dt_val+'\"';
            
            worksheetLine = '['+worksheetLine+']';
            worksheetLines = worksheetLines + ','+ worksheetLine;
        } 
        if(orig_norm_net_prc_d>0.0){
            orig_norm_net_prc_d = orig_norm_net_prc_d.setScale(2);
            orig_norm_net_prc = '\"'+String.valueOf(orig_norm_net_prc_d)+'\"';
            curr_norm_net_prc = orig_norm_net_prc;
        }else{
            orig_norm_net_prc = '\"'+'\"';
            curr_norm_net_prc = '\"'+'\"';
        }
        worksheetLines = worksheetLines.substring(1,worksheetLines.length());
        worksheetLines = worksheetLines.replace('null',''); 
    }
}
Aside from the "Today" page, where else can I access global actions?
Hi, 

I have created a controller that would query some information from a custom child object so I can use it from its parent object. These two objects have a master-detail relationship.  

Parent/master object: Media_Plan__c
Child/detailed object: Media_Deliverable__c

I need to have a visualforce page that renders as PDF in Media_Plan__c layout. This page would get triggered with a button on the layout, this pdf page would get some information from Media_Plan__c and from its child object Media_Deliverable__c. I need some help with this page, how can I apply my controller to achieve this? I was thinking of using apex:repeat, but not sure how to apply this.   

The following is my controller -
 
public with sharing class Abc {
    public List<Media_Deliverable__c > childLs{get;set;}
    
    public Abc(ApexPages.StandardController controller) {
        
      	childLs= new List<Media_Deliverable__c >();
        id parId = ApexPages.currentPage().getParameters().get('id');

      	childLs = [select id, Deliverable_Name__c, Product__c, Product_copy__c, 
		Quantity__c, Rate__c, True_Total_Value__c, Value__c, Value_Add__c,
		Value_add_price__c from Media_Deliverable__c where Media_Plan__c = :parId ];
    }
}
  • December 20, 2016
  • Like
  • 0
Is there a way for one component to reference the functions in another without embedding?

If I have to embed the component, how do I reference there parent function from a  child component and vice versa?
While MavensMate is riding off into the sunset, it's going to remain relevant for a bit.  That said, what's The Thing to use moving forward to connect VS Code, Atom, or Sublime to the Salesforce backend?

Thanks,

Steve