• Debaranjan Ghosh
  • NEWBIE
  • 39 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 14
    Questions
  • 45
    Replies
Hello All ,

I am using a very simple VFP and Apex extension and getting this error where ideally it should not throw this error 

VFP :
<apex:page standardController="UAL_Customer_Services__c" extensions="UALServicesPDF" standardstylesheets="false" renderAs="pdf" applyHtmlTag="false" showHeader="false" sidebar="false">
        <apex:pageMessages ></apex:pageMessages>
    <html>
     <head> 
            <style type="text/css" media="print">          
                @page {     
                size: A4 relative;             
                margin-top:3cm;
                margin-bottom:0.5cm;
                margin-left:17px;
                margin-right:20px;
                
                @top-center {
                content: element(header);
                }
                @bottom-center {
                content: element(footer);
                }
                
                }
                 table, th, td 
                {
                border-collapse: collapse;
                }
                div.header {
                padding:5px;
                position: running(header);
                } 
                body 
                {
                font-family: Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif;//'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;
                font-weight:normal; 
                font-size:14px; 
                mso-line-height-rule: exactly;
                }
                div.footer {
                padding:5px;
                position: running(footer);
                }
                ms{
                padding:5px;
                }
            </style>
    </head>
  <body>
           <div Style="margin:2px;">
           <p style="font-size:larger;text-align:center;font-weight: bold;" >UAL INDUSTRIES LIMITED</p>
           <p style="font-size:larger;text-align:center;font-weight: bold;" >Loss Assessment for the period</p>
           <p style="font-size:larger;text-align:center;font-weight: bold;" >PRODUCT TYPE - KAILASH GOLD</p>           
           <p style="font-size:larger;text-align:center;font-weight: bold;" >STORAGE LOCATION - U101</p>
           <p style="font-size:larger;text-align:center;font-weight: bold;" >Date of Inspection - 25.06.2023</p>
           </div> 
      
       <div><table border="1" width="100%" Style="margin:2px;">
        <tr><td width="50%">DOCUMENT NO.</td><td>{!UAL_Customer_Services__c.name}</td></tr>
        <tr><td width="50%">DOCUMENT DATE </td><td><apex:outputText value="{0,date,dd'/'MM'/'yyyy}"><apex:param value="{!UAL_Customer_Services__c.Entry_Date__c}"/></apex:outputText> </td></tr>
        <tr><td width="50%">MAIN PARTY</td><td>{!UAL_Customer_Services__c.Dealer_Name__r.name}</td></tr>
        <tr><td width="50%">ADDRESS</td><td>{!UAL_Customer_Services__c.Dealer_Name__r.Address_1__c}</td></tr>     
        <tr><td width="50%">PIN CODE</td><td>{!UAL_Customer_Services__c.Dealer_Name__r.PIN_Code__c}</td></tr>
        <tr><td width="50%">STATE</td><td>{!UAL_Customer_Services__c.Dealer_Name__r.Region__c}</td></tr>
        <tr><td width="50%">Party Code</td><td>{!UAL_Customer_Services__c.Dealer_Code__c}</td></tr>
        <tr><td width="50%">ASSESSMENT TYPE</td><td>BREAKAGE LOSS ASSESSMENT</td></tr></table></div>
      
      
         <div><table border="1" width="100%"><tr>
                 <th width="20%" style="text-align:center;">Size</th>
                <th width="15%" style="text-align:center;">Input(MTR)</th>
                <th width="15%" style="text-align:center;">Input(MT)</th>
                <th width="15%" style="text-align:center;">Output(MTR)</th>
                <th width="15%" style="text-align:center;">Output(MT)</th>
                <th width="10%" style="text-align:center;">Loss(MTR)</th>
                <th width="10%" style="text-align:center;">Loss(MT)</th>
                </tr>
              <apex:repeat value="{!UalSvmstlist}" var="SvDtllist">
                  <tr>
                    <!--<td width="20%" style="text-align:center">{!SvDtllist.Size__c}</td>
                    <td width="20%" style="text-align:center">{!SvDtllist.Size__c}</td>
                    <td width="20%" style="text-align:center">{!SvDtllist.Input_MT__c}</td>
                    <td width="20%" style="text-align:center">{!SvDtllist.Available_Size_m__c}</td>
                    <td style="text-align:right;" width="20%">{!SvDtllist.Output_MT__c}</td> 
                    <td style="text-align:right;" width="20%">{!SvDtllist.Loss_MTR__c}</td> 
                    <td style="text-align:right;" width="20%">{!SvDtllist.Loss_MT__c}</td>--> 
                </tr></apex:repeat>
            </table></div>
        </body>
           </html>

APEX :
public with sharing class  UALServicesPDF {
    public Id aids {set;get;}
    LIST<UAL_Customer_Services__c> UalSvmstlist {set;get;}
    LIST<UAL_Customer_Service_Details__c> UalSvDtllist {set;get;}
                                            
    public UALServicesPDF(Apexpages.StandardController std){
      aids=Apexpages.currentPage().getParameters().get('Id');
        
      UalSvmstlist = [SELECT id, name from  UAL_Customer_Services__c where id =  :aids];
        
      UalSvDtllist = [SELECT 
                        UAL_Customer_Services__c,
                        Size__c,
                        Input_MT__c,
                        Available_Size_m__c,
                        Output_MT__c,
                        Loss_MTR__c,
                        Loss_MT__c,
                        Corrugation__c
                        FROM 
                        UAL_Customer_Service_Details__c
                        WHERE 
                        UAL_Customer_Services__r.id = :aids];
      }
}
 
Hello All,

I am trying to copy a LWC component from 1 org to another org after making small chnage for 1 custom object . This LWC created to send Bulk email from the Org and uses a SOQL to get rows from EmailTemplate as below 
List<EmailTemplate> emailTemplatelist =[Select Id,Subject,Description,
                                                    HtmlValue,
                                                    DeveloperName,Body,IsActive from EmailTemplate WHERE DeveloperName LIKE 'ISOCL%' AND IsActive = true];
            system.debug('Email list '+emailTemplatelist);

and this soql containing function () is imported in JS of the LWC which throws error when tried to save as 

groupEmailTemplateSelect.js : Save Failed. Error HtmlValue, ^ ERROR at Row:2:Column:53 No such column 'HtmlValue' on entity 'EmailTemplate'. 
If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.: Source
groupEmailTemplateSelect.js : Linting & Saving the components initiated initiated.

This JS is sucessfuly saved in the source Org but in the target org where it is copied is throwing error as shown.

I also noticed this SOQL when executed using the same profile from query editor of Dev console gets executed sucessfully and shows the desired rows. However if Tooling API is checked then throws the same error that we get from Advanced Code searched window while trying to save the JS 

This is crtical for my project work And I will really appreciate if you can help me to get a Fix for the Issue which looks like a setting issue in the org but I dont know where which settings needs to be chnaged.

Best Regards 
Debaranjan Ghosh
I tried to Down Load below Package ( as part of Trail Head Module ) from Appexchange but Can not find it. Can you please help to find it ?
Package ID: 04t2E00000161fN(ContactsToday custom lightning component )

Best Regards 
Debaranjan Ghosh
In Salesforce how do we assign large queries results to a collection and looping through the collection ( ie without SOQL for loops )? Please share code example 

Best Regards 
Debaranjan Ghosh
As per my understanding correct Answers for the below question should be A and B but it is given B and C . Can you please explain why BC is correct ?
 

 
Question 42 ( Topic 1 ) Which two strategies should a developer use to avoid hitting governor limits when  developing in a multi-tenant environment? (Choose two.) 
• A. Use collections to store all fields from a related object and not just minimally  required fields. 
• B. Use methods from the ג€Limitsג €class to monitor governor limits. 
• C. Use SOQL for loops to iterate data retrieved from queries that return a high number  of rows. 
• D. Use variables within Apex classes to store large amounts of data. Answer : BC    
Hello All 
Can you tell me How Can I simulate and test this Question In Developer Org?
 
Question 34 ( Topic 1 )       
A developer needs to join data received from an integration with an external system with  
parent records in Salesforce. The data set does not contain the    
Salesforce IDs of the parent records, but it does have a foreign key attribute that can be used  
to identify the parent.       
Which action will allow the developer to relate records in the data model without knowing  
the Salesforce ID?        
          
          
• A. Create and populate a custom field on the parent object marked as Unique.  
• B. Create a custom field on the child object of type External Relationship.   
• C. Create and populate a custom field on the parent object marked as an External ID.  
• D. Create a custom field on the child object of type Foreign Key.   
          
Answer : D        

Regards 
Debaranjan Ghosh
Question 33 ( Topic 1 )     
When is an Apex Trigger required instead of a Process Builder Process? 
• A. When a record needs to be created    
• B. When multiple records related to the triggering record need to be updated
• C. When a post to Chatter needs to be created   
• D. When an action needs to be taken on a delete or undelete, or before a DML 
operation is executed     
        
Answer : D      

While simulation with After Insert Trigger and Pocess Builder noticed we can not insert a 2nd Row in the same table while we can do that From Process Builder for a certain value of a field as a Condition then why A is not also a possible answer ? Can you please help to explain ?
Also can you please suggest How to simulate for B, C D? Code for A is given below.
Trigger objecttgr on Address__c(after insert){                
List<Address__c> cons =new List<Address__c>();                
 for(Address__c a :trigger.new){                   
   IF(a.Address_Line_1__c == 'XXY'){                
   Address__c c  =new Address__c();                
   c.Address_Line_1__c = 'XXXYYY';                     
   cons.add(c);   }             
}                
insert cons;                
}                
Question 32 ( Topic 1 )     
Using the Schema Builder, a developer tries to change the API name of a field that is 
referenced in an Apex test class.    
What is the end result?     
• A. The API name is not changed and there are no other impacts. 
• B. The API name of the field and the reference in the test class is changed. 
• C. The API name of the field is changed, and a warning is issued to update the class.
• D. The API name of the field and the reference in the test class is updated. 
Answer : C      

I tried this from Schema Browser with below Code and System did not allow me to Change API Name of the field (Error given below)
Can you please explain what I am missing here? 
@isTest    
private class AddressTest {    
    static TestMethod void AddressTest_UnitTest(){    
        Test.startTest();    
            Address__c account = new Address__c(Address_Line_1__c = '100');    
            insert account;
        Test.stopTest();    
    }    
}    
Cannot rename custom field referenced in Apex class or trigger: <a href="/01p6F00000R8nDn">AddressTest</a>
Question 28 ( Topic 1 )      
Universal Containers wants Opportunities to be locked from editing when reaching the  
Closed/Won stage.       
Which two strategies should a developer use to accomplish this? (Choose two.) 
• A. Use a Visual Workflow.      
• B. Use a validation rule.   -------> Here we need to write code as done earlier. 
• Thanks in advance.
Debaranjan Ghosh
     

 
       
         
A company has a custom object named Warehouse. Each Warehouse record has a distinct
record owner, and is related to a parent Account in Salesforce.Which kind of relationship would a
developer use to relate the Account to the Warehouse?
A. One -to -Many
B. Parent -Child
C. Master -Detail
D. Lookup
Answer: D
Why will it be Look up and why not Master Detail ? Can you plerase explain?
Want to Create a Master Detail Screen in Visual force Page where we will input
Master field and based on that either by pressing enter or clicking a button 
it will show list of Maching Record which can be edited and saved 
Can you please guide me how to achieve this using Custom Controller and VFP 
Hello Guys 

Need one small Clarification on usage of Aura if Syntax :
Can we use <tr> inside aura if ?
I got a big error from Dev Console after doing that though the Aura Component was saved successfully without giving error.
Following is the code structure 

<aura:attribute name="invoiceRecordDetail" type="Invoice__c" />
<aura:attribute name="InvoiceTypeMed" type="string" default="Medical" />
.....


<table>
...
<tbody>

<aura:if isTrue="{!v.invoiceRecordDetail.Invoice_Type__c==InvoiceTypeMed}">
<tr>
.....
</tr>
</aura:if>

<tbody>
.....
</table>
.....
 
I am posting a code where I used Contains I would like to use equalgnorecase() along with that and also a null replace ment is done for which I would like to know the isnull() usgae 

System.debug(LoggingLevel.INFO, 'My Info Debug Message');
System.debug(LoggingLevel.FINE, 'My Fine Debug Message');
List<Account> accts = [SELECT Id, Name, parent.name FROM Account];
for(Account a : accts) {
    String Naa_Sup_Cvs_Omcare_Ac = a.name.toLowerCase();
    String Naa_Sup_Cvs_Omcare_Pr_Ac = a.parent.name == null ? '' :a.parent.name.toLowerCase();
    if(Naa_Sup_Cvs_Omcare_Ac.contains('ocare')||
       Naa_Sup_Cvs_Omcare_Ac.contains('pvs')||
       Naa_Sup_Cvs_Omcare_Pr_Ac.contains('ocare')||
       Naa_Sup_Cvs_Omcare_Pr_Ac.contains('pvs'))
    {System.debug('*****Non ocare/cvs Account Name: ' + a.name);
     System.debug('*****Non ocare/cvs Account  Parent Name: ' + a.parent.name);
    } 
}
Hello All ,

I am using a very simple VFP and Apex extension and getting this error where ideally it should not throw this error 

VFP :
<apex:page standardController="UAL_Customer_Services__c" extensions="UALServicesPDF" standardstylesheets="false" renderAs="pdf" applyHtmlTag="false" showHeader="false" sidebar="false">
        <apex:pageMessages ></apex:pageMessages>
    <html>
     <head> 
            <style type="text/css" media="print">          
                @page {     
                size: A4 relative;             
                margin-top:3cm;
                margin-bottom:0.5cm;
                margin-left:17px;
                margin-right:20px;
                
                @top-center {
                content: element(header);
                }
                @bottom-center {
                content: element(footer);
                }
                
                }
                 table, th, td 
                {
                border-collapse: collapse;
                }
                div.header {
                padding:5px;
                position: running(header);
                } 
                body 
                {
                font-family: Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif;//'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif;
                font-weight:normal; 
                font-size:14px; 
                mso-line-height-rule: exactly;
                }
                div.footer {
                padding:5px;
                position: running(footer);
                }
                ms{
                padding:5px;
                }
            </style>
    </head>
  <body>
           <div Style="margin:2px;">
           <p style="font-size:larger;text-align:center;font-weight: bold;" >UAL INDUSTRIES LIMITED</p>
           <p style="font-size:larger;text-align:center;font-weight: bold;" >Loss Assessment for the period</p>
           <p style="font-size:larger;text-align:center;font-weight: bold;" >PRODUCT TYPE - KAILASH GOLD</p>           
           <p style="font-size:larger;text-align:center;font-weight: bold;" >STORAGE LOCATION - U101</p>
           <p style="font-size:larger;text-align:center;font-weight: bold;" >Date of Inspection - 25.06.2023</p>
           </div> 
      
       <div><table border="1" width="100%" Style="margin:2px;">
        <tr><td width="50%">DOCUMENT NO.</td><td>{!UAL_Customer_Services__c.name}</td></tr>
        <tr><td width="50%">DOCUMENT DATE </td><td><apex:outputText value="{0,date,dd'/'MM'/'yyyy}"><apex:param value="{!UAL_Customer_Services__c.Entry_Date__c}"/></apex:outputText> </td></tr>
        <tr><td width="50%">MAIN PARTY</td><td>{!UAL_Customer_Services__c.Dealer_Name__r.name}</td></tr>
        <tr><td width="50%">ADDRESS</td><td>{!UAL_Customer_Services__c.Dealer_Name__r.Address_1__c}</td></tr>     
        <tr><td width="50%">PIN CODE</td><td>{!UAL_Customer_Services__c.Dealer_Name__r.PIN_Code__c}</td></tr>
        <tr><td width="50%">STATE</td><td>{!UAL_Customer_Services__c.Dealer_Name__r.Region__c}</td></tr>
        <tr><td width="50%">Party Code</td><td>{!UAL_Customer_Services__c.Dealer_Code__c}</td></tr>
        <tr><td width="50%">ASSESSMENT TYPE</td><td>BREAKAGE LOSS ASSESSMENT</td></tr></table></div>
      
      
         <div><table border="1" width="100%"><tr>
                 <th width="20%" style="text-align:center;">Size</th>
                <th width="15%" style="text-align:center;">Input(MTR)</th>
                <th width="15%" style="text-align:center;">Input(MT)</th>
                <th width="15%" style="text-align:center;">Output(MTR)</th>
                <th width="15%" style="text-align:center;">Output(MT)</th>
                <th width="10%" style="text-align:center;">Loss(MTR)</th>
                <th width="10%" style="text-align:center;">Loss(MT)</th>
                </tr>
              <apex:repeat value="{!UalSvmstlist}" var="SvDtllist">
                  <tr>
                    <!--<td width="20%" style="text-align:center">{!SvDtllist.Size__c}</td>
                    <td width="20%" style="text-align:center">{!SvDtllist.Size__c}</td>
                    <td width="20%" style="text-align:center">{!SvDtllist.Input_MT__c}</td>
                    <td width="20%" style="text-align:center">{!SvDtllist.Available_Size_m__c}</td>
                    <td style="text-align:right;" width="20%">{!SvDtllist.Output_MT__c}</td> 
                    <td style="text-align:right;" width="20%">{!SvDtllist.Loss_MTR__c}</td> 
                    <td style="text-align:right;" width="20%">{!SvDtllist.Loss_MT__c}</td>--> 
                </tr></apex:repeat>
            </table></div>
        </body>
           </html>

APEX :
public with sharing class  UALServicesPDF {
    public Id aids {set;get;}
    LIST<UAL_Customer_Services__c> UalSvmstlist {set;get;}
    LIST<UAL_Customer_Service_Details__c> UalSvDtllist {set;get;}
                                            
    public UALServicesPDF(Apexpages.StandardController std){
      aids=Apexpages.currentPage().getParameters().get('Id');
        
      UalSvmstlist = [SELECT id, name from  UAL_Customer_Services__c where id =  :aids];
        
      UalSvDtllist = [SELECT 
                        UAL_Customer_Services__c,
                        Size__c,
                        Input_MT__c,
                        Available_Size_m__c,
                        Output_MT__c,
                        Loss_MTR__c,
                        Loss_MT__c,
                        Corrugation__c
                        FROM 
                        UAL_Customer_Service_Details__c
                        WHERE 
                        UAL_Customer_Services__r.id = :aids];
      }
}
 
Hello All,

I am trying to copy a LWC component from 1 org to another org after making small chnage for 1 custom object . This LWC created to send Bulk email from the Org and uses a SOQL to get rows from EmailTemplate as below 
List<EmailTemplate> emailTemplatelist =[Select Id,Subject,Description,
                                                    HtmlValue,
                                                    DeveloperName,Body,IsActive from EmailTemplate WHERE DeveloperName LIKE 'ISOCL%' AND IsActive = true];
            system.debug('Email list '+emailTemplatelist);

and this soql containing function () is imported in JS of the LWC which throws error when tried to save as 

groupEmailTemplateSelect.js : Save Failed. Error HtmlValue, ^ ERROR at Row:2:Column:53 No such column 'HtmlValue' on entity 'EmailTemplate'. 
If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.: Source
groupEmailTemplateSelect.js : Linting & Saving the components initiated initiated.

This JS is sucessfuly saved in the source Org but in the target org where it is copied is throwing error as shown.

I also noticed this SOQL when executed using the same profile from query editor of Dev console gets executed sucessfully and shows the desired rows. However if Tooling API is checked then throws the same error that we get from Advanced Code searched window while trying to save the JS 

This is crtical for my project work And I will really appreciate if you can help me to get a Fix for the Issue which looks like a setting issue in the org but I dont know where which settings needs to be chnaged.

Best Regards 
Debaranjan Ghosh
Question 28 ( Topic 1 )      
Universal Containers wants Opportunities to be locked from editing when reaching the  
Closed/Won stage.       
Which two strategies should a developer use to accomplish this? (Choose two.) 
• A. Use a Visual Workflow.      
• B. Use a validation rule.   -------> Here we need to write code as done earlier. 
• Thanks in advance.
Debaranjan Ghosh
     

 
       
         
A company has a custom object named Warehouse. Each Warehouse record has a distinct
record owner, and is related to a parent Account in Salesforce.Which kind of relationship would a
developer use to relate the Account to the Warehouse?
A. One -to -Many
B. Parent -Child
C. Master -Detail
D. Lookup
Answer: D
Why will it be Look up and why not Master Detail ? Can you plerase explain?
We received an email regarding actively using legacy API endpoints. We understand that we need to take action before May 2022 and we have read the Salesforce article, Salesforce Platform API Versions 7.0 through 20.0 Retirement. We are a small organization and do not have a SalesForce developer to understand what action we need to take to ensure we don't have any interruptions when the retirement takes place. Could someone please help us understand exactly what is it we need to do with an easy-to-understand explanation? We opened a case with Salesforce and were told to post our question here. Any assistance would greatly be appreciated!
Hi All,

I have developed A vf page ,when ever we click the search button  some licenced users should display the table. when ever i click it was displaying all the users in the table .

When ever we click he search we should display the perticular users, colud you please help on this.

Thanks in advace .

Regards,
Ramu.Vf page
Want to Create a Master Detail Screen in Visual force Page where we will input
Master field and based on that either by pressing enter or clicking a button 
it will show list of Maching Record which can be edited and saved 
Can you please guide me how to achieve this using Custom Controller and VFP 

A developer created a Lightning Component to display a short text summary for an object and wants to use it with multiple Apex classes.
How should the developer design the Apex classes?


Extend each class from the same base class that has a method getTextSummary() that returns the summary.
Have each class define method getTextSummary() that returns the summary.
Have each class define method getObject() that returns the sObject that is controlled by the Apex class.
Have each class implement an interface that defines method getTextSummary() that returns the summary.

 

Please let me know which is correct answer form above.

I am getting this error, but cannot figure out how to correct it.  System.DmlException: Insert failed. First exception on row 0; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, Direction: bad value for restricted picklist field: backwards: [Direction__c]
Hi,
Can anyone review the codes quickly and check why the component is not showing on the list of available components on the lightning app builder although it has force:appHostable? Thanks!

COMPONENT
<aura:component controller="NonUserAccountTeamController" 
implements="force:appHostable,force:hasRecordId,flexipage:availableForAllPageTypes">

	<aura:attribute name="nonUserAccountTeamMembers" type="Non_User_Account_Team__c[]" />
	<aura:attribute name="employees" type="Employee__c[]" />
	
	<aura:handler name="updateNonUserAccountTeam" event="c:updateNonUserAccountTeamUser"
        action="{!c.handleUpdateNonUserAccountTeam}"/>
			
	<aura:handler name="init" action="{!c.doInit}" value="{!this}" />
    
    <div class="slds">
 
      <div class="slds-page-header">
        <div class="slds-grid">
          <div class="slds-col slds-has-flexi-truncate">
            <p class="slds-text-heading--label">Coverage Team</p>
              <div class="slds-grid">
                <div class="slds-grid slds-type-focus slds-no-space">
                  <h1 class="slds-text-heading--medium slds-truncate" title="Coverage Team">
                  {!'Coverage Team Members ' + '(' + 'Non_User_Account_Team__c[].size' +')'}
                  </h1>
                </div>
                <ui:button aura:id="button" buttonTitle="Manage the employees handling this account" 
                class="button" label="Add Coverage Team Members" press="{!c.clickAdd}"/>
              </div>
           </div>
         </div>
       </div> <!-- End of Header -->
		</div> <!-- End of SLDS -->
    <c:NonUserAccountTeamListItem nonUserAccountTeams="nonUserAccountTeamMembers" employees="employees"/>
    
    <ui:button aura:id="button" buttonTitle="View all the members of this team" 
    class="button" label="View All" press="{!c.clickViewAll}"/>
     

	
</aura:component>

CONTROLLER: 
({
	doInit : function(component, event, helper) {
		// Prepare the action to load account record
		var action = component.get("c.getUsers");
		action.setParams({
			"recordId" : component.get("v.recordId")
		});
		// Configure response handler
		action.setCallback(this, function(response) {
			var state = response.getState();
			if(component.isValid() && state === "SUCCESS") {
				component.set("v.nonUserAccountTeamMembers", response.getReturnValue());
			} else {
				console.log('Problem getting account, response state: ' + state);
			}
		});
		$A.enqueueAction(action);
	},
	
	clickAdd : function (component, event, helper) {
	    var createRecordEvent = $A.get("e.force:createRecord");
	    createRecordEvent.setParams({
	        "entityApiName": "Non_User_Account_Team__c"
	    });
	    createRecordEvent.fire();
	},
	
	clickViewAll : function (component, event, helper) {
	    var relatedListEvent = $A.get("e.force:navigateToRelatedList");
	    relatedListEvent.setParams({
	        "relatedListId": "nonUserAccountTeamMembers",
	        "parentRecordId": component.get("v.recordId")
	    });
	    relatedListEvent.fire();
	},
	
	handleUpdateNonAccountUserTeam: function(component, event, helper) {
		//Update the new expense
		var updatedUser = event.getParam("nonUserAccountTeamMember");
		helper.updateUser(component, updatedUser);
	},
	
})

HELPER:
({
	saveUser: function(component, user, callback) {
	    var action = component.get("c.saveUser");
	    action.setParams({
	        "user": user
	    });
	    if (callback) {
	        action.setCallback(this, callback);
	    }
	    $A.enqueueAction(action);
	},

	
	createUser: function(component, user) {
	    this.saveExpense(component, user, function(response){
	        var state = response.getState();
	        if (component.isValid() && state === "SUCCESS") {
	            var users = component.get("v.nonUserAccountTeamMembers");
	            expenses.push(response.getReturnValue());
	            component.set("v.nonUserAccountTeamMembers", users);
	        }
	    }); 
	},
	
	updateUser: function(component, user) {
	    this.saveExpense(component, user);
	},
	
})

 

hi, im new to salesforce and i was wondering what was the difference between __c and __r when refering to a custom object. Also can u give me examples. thanks

Hi How do I get around this error message...

Collection size 1,609 exceeds maximum size of 1,000.

 

 

public String cname{get; set;} public List<SelectOption> getnames() { List<SelectOption> options = new List<SelectOption>(); List<Contact> namelist = new List<Contact>(); namelist = [Select Id, Name FROM Contact where Recordtype.name='Company' Order by LastName,FirstName]; options.add(new SelectOption('--None--','--None--')); for (Integer j=0;j<namelist.size();j++) { options.add(new SelectOption(namelist[j].Name,namelist[j].Name)); } return options; }

 

 

<td> <apex:outputlabel value="Company Names" for="cnamed" /> <apex:selectList value="{!cname}" size="1" id="cnamed"> <apex:actionSupport event="onchange" reRender="newvalue" /> <apex:selectOptions value="{!names}"/> </apex:selectList> </td>

 Thank you

 

 

I am looking for some part-time Salesforce support for my organization. We are a nonprofit that helps veterans get access to mental healthcare. Please let me know if you are interested!