-
ChatterFeed
-
3Best Answers
-
2Likes Received
-
1Likes Given
-
35Questions
-
39Replies
Visualforce PDF page getting information from child object
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 ]; } }
- ArmanM
- December 20, 2016
- Like
- 0
- Continue reading or reply
SOQL query need help urgent...thanks
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)];
- Rajnisf
- April 02, 2013
- Like
- 0
- Continue reading or reply
Schedule Apex from Schedule Job
- Flint Lockwood
- September 14, 2019
- Like
- 0
- Continue reading or reply
Event Listener for Record Save
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.
- Flint Lockwood
- April 23, 2019
- Like
- 0
- Continue reading or reply
Custom Success Message Lightning Action
Is it possible to use merge fields in custom success messages in Lightning?
- Flint Lockwood
- April 23, 2019
- Like
- 0
- Continue reading or reply
Omnichannel Backlog Notification
- Flint Lockwood
- September 10, 2018
- Like
- 0
- Continue reading or reply
Omnichannel Routing Priority
- Flint Lockwood
- September 09, 2018
- Like
- 0
- Continue reading or reply
LiveAgent Request for Help
- Flint Lockwood
- September 07, 2018
- Like
- 0
- Continue reading or reply
- Flint Lockwood
- August 31, 2018
- Like
- 0
- Continue reading or reply
Create Chatter Post with Macros
- Flint Lockwood
- August 13, 2018
- Like
- 0
- Continue reading or reply
Case Action not Showing
- Flint Lockwood
- July 26, 2018
- Like
- 0
- Continue reading or reply
Entitlement Process Action Failed to Trigger Process Builder
- Flint Lockwood
- July 26, 2018
- Like
- 0
- Continue reading or reply
Lightning Component Documentation
- Flint Lockwood
- July 12, 2018
- Like
- 0
- Continue reading or reply
Data Catagory Lightning Knowledge
- Flint Lockwood
- July 05, 2018
- Like
- 0
- Continue reading or reply
Pass List Variable Between Lightning Component
- Flint Lockwood
- April 09, 2018
- Like
- 0
- Continue reading or reply
Unable to select row after sorting Lightning:Datatable
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?
- Flint Lockwood
- April 05, 2018
- Like
- 0
- Continue reading or reply
Querying the UserServicePresence Object
- Flint Lockwood
- February 23, 2017
- Like
- 0
- Continue reading or reply
Custom Sort Wrapper Class
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; } }
- Flint Lockwood
- February 20, 2017
- Like
- 0
- Continue reading or reply
Navigate to List View in Service Console
- Flint Lockwood
- February 10, 2017
- Like
- 0
- Continue reading or reply
Process Builder Update Case Owner to Queue
- Flint Lockwood
- January 26, 2017
- Like
- 0
- Continue reading or reply
Chatter Email Notification
- Flint Lockwood
- January 24, 2017
- Like
- 0
- Continue reading or reply
Redirect to Lightning Component from Visualforce page
- Flint Lockwood
- January 12, 2017
- Like
- 0
- Continue reading or reply
Reusing Functions Salesforce Lightning
If I have to embed the component, how do I reference there parent function from a child component and vice versa?
- Flint Lockwood
- December 19, 2016
- Like
- 1
- Continue reading or reply
Display and Hiding Loading Spinner in Salesforce Lightning
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.
- Flint Lockwood
- December 16, 2016
- Like
- 1
- Continue reading or reply
Case Action not Showing
- Flint Lockwood
- July 26, 2018
- Like
- 0
- Continue reading or reply
Entitlement Process Action Failed to Trigger Process Builder
- Flint Lockwood
- July 26, 2018
- Like
- 0
- Continue reading or reply
Lightning Component Documentation
- Flint Lockwood
- July 12, 2018
- Like
- 0
- Continue reading or reply
How to write a test class for AuraEnabled Lightning controller
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...
- Kumar G
- May 09, 2018
- Like
- 0
- Continue reading or reply
how we can redirect to edit page after double click on field on visual force page
how we can redirect to edit page after double click on field in page.
Thanks in advance
- Rathod Babu
- April 09, 2018
- Like
- 0
- Continue reading or reply
Querying the UserServicePresence Object
- Flint Lockwood
- February 23, 2017
- Like
- 0
- Continue reading or reply
Can I edit a Page Layout through Apex?
- George Oster
- January 24, 2017
- Like
- 0
- Continue reading or reply
Chatter Email Notification
- Flint Lockwood
- January 24, 2017
- Like
- 0
- Continue reading or reply
iframe Salesforce Lightning
- Flint Lockwood
- January 10, 2017
- Like
- 0
- Continue reading or reply
Incorrect counter for deleting row
Hello Everyone,
I have this VF page that can add new rows of fields and delete a row of fields
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.
- Lorenz Cortez
- January 10, 2017
- Like
- 0
- Continue reading or reply
how to write test class for standard controller extension for the below code? Please help me..
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','');
}
}
- praveena peketi
- December 22, 2016
- Like
- 0
- Continue reading or reply
Global Action Salesforce1
- Flint Lockwood
- December 20, 2016
- Like
- 0
- Continue reading or reply
Visualforce PDF page getting information from child object
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 ]; } }
- ArmanM
- December 20, 2016
- Like
- 0
- Continue reading or reply
Reusing Functions Salesforce Lightning
If I have to embed the component, how do I reference there parent function from a child component and vice versa?
- Flint Lockwood
- December 19, 2016
- Like
- 1
- Continue reading or reply
Using VS Code and connecting to Salesforce (replacing the MM layer)
Thanks,
Steve
- Steve Berley
- February 12, 2018
- Like
- 5
- Continue reading or reply