• cjen
  • NEWBIE
  • 50 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 24
    Questions
  • 18
    Replies
hi, i have a flow that counts all of the assets related to account and updates a number field on the account. This works for new assets but i am not able to launch the flow if an asset is deleted. I am understanding that a trigger can be created to do this, maybe after delete? I need to pass the AccountId of the deleted asset into the flow. i researched and found a sample flow code.

the scenario would be a user deletes an asset record which triggers the flow to count all the assets related to the same account the deleted asset was related to, and then update a number field on the account with the new value. Any help is greatly appreciated, thanks!
 
Flow.Interview flow = new Flow.Interview.MyFlowApiName(new map<String,Object> 
                                                {'vAccountId' => aId});     
flow.start();
  • March 18, 2020
  • Like
  • 0
hi, i have an extention controller and a test method but i am only able to achieve 13 % converage, 3/23. This code is just queries and sending the output to a visualforce page. Can anyone please explain what i need to test for to get 100% coverage? And an example woudl be helpful too, please. Thank you!

controller:
public extendAccountsChannel2(ApexPages.StandardController controller) {
        Id id = ApexPages.currentPage().getParameters().get('id');
        
        
        if(ApexPages.currentPage().getParameters().get('id') != null){
            
           id accRecId = [select id from Account where id = :id].id;
           
           
            if(accRecId != null){
                channels = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Retail' AND Investor_Status__c = 'Active' LIMIT 1];
                channelsWholesale = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Wholesale' LIMIT 1];  
                channelsMiniCorrespondent = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Mini Correspondent' LIMIT 1];
                channelsCorrespondentAOTDirectTrade = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent AOT / Direct Trade' LIMIT 1]; 
                channelsCorrespondentBestEfforts = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Best Efforts' LIMIT 1]; 
                channelsCorrespondentMandatoryBulkFlow = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Mandatory (Bulk/Flow)' LIMIT 1]; 
                channelsCorrespondentNonDelegated = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non Delegated' LIMIT 1];
                channelsCorrespondentNonDelMandatory = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non-Del Mandatory' LIMIT 1];
                
                
                 
            }
        }
        
        
        
    }
    
}

test:
 
@isTest
private class extendAccountsChannel2_Test{   
    static testMethod void extendAccountsChannel2_channels(){
        
        Account aa = new Account();
        aa.name='TestInvestor';
        insert aa;
        
        //Create Retail Channel   
        Investor_Channel__c ic = new Investor_Channel__c();
        ic.Channel__c ='Retail';
        ic.Investor_Status__c = 'Active';
        ic.Account_Name__c = aa.Id;
        insert ic;
        
        //Create Wholesale Channel   
        Investor_Channel__c ic2 = new Investor_Channel__c();
        ic2.Channel__c ='Wholesale';
        ic2.Account_Name__c = aa.Id;
        insert ic2;
        
        //Create Mini Correspondent Channel   
        Investor_Channel__c ic3 = new Investor_Channel__c();
        ic3.Channel__c ='Mini Correspondent';
        ic3.Account_Name__c = aa.Id;
        insert ic3;
        
        //Create Correspondent AOT / Direct Trade   
        Investor_Channel__c ic4 = new Investor_Channel__c();
        ic4.Channel__c ='Correspondent AOT / Direct Trade';
        ic4.Account_Name__c = aa.Id;
        insert ic4;
                
           

        ApexPages.StandardController sc = new ApexPages.StandardController(aa);
        extendAccountsChannel2 testAccPlan = new extendAccountsChannel2(sc);
         
        PageReference pageRef = Page.Investor_Channel_Tabs; // Add your VF page Name here
        Test.setCurrentPage(pageRef);
            
         
        //Verify that records were created
   List <Investor_Channel__c> channels = [SELECT Id FROM Investor_Channel__c WHERE Account_Name__r.id = :aa.Id AND Channel__c ='Retail'LIMIT 1];
    
      
        System.assert( channels  != null);
  
    
    
    List <Investor_Channel__c> channelsWholesale = [SELECT Id FROM Investor_Channel__c  WHERE Account_Name__r.id = :aa.Id AND Channel__c ='Wholesale'LIMIT 1];
          System.assert( channelsWholesale != null);
    
    
    List <Investor_Channel__c> channelsMiniCorrespondent = [SELECT Id FROM Investor_Channel__c  WHERE Account_Name__r.id = :aa.Id AND Channel__c ='Mini Correspondent'LIMIT 1];
          System.assert( channelsMiniCorrespondent != null);
          
          List <Investor_Channel__c> channelsCorrespondentAOTDirectTrade = [SELECT Id FROM Investor_Channel__c  WHERE Account_Name__r.id = :aa.Id AND Channel__c ='Correspondent AOT / Direct Trade'LIMIT 1];
          System.assert( channelsCorrespondentAOTDirectTrade != null);
    
    
    
        
}
}

​​​​​​​
  • March 03, 2020
  • Like
  • 0
hi, i have an apex class that just runs querries. I am trying to write the test class but failing to get any coverage. First of all, i am not too sure what i am testing here, just creating an account and a custom object related record, then query for it. My current test passes, but my controller still shows 0/23 code coverage? Any help much appreciated, thanks!
controller:

public class extendAccountsChannel2 { 
    public List <Investor_Channel__c> channels{get; set;} 
    public List <Investor_Channel__c> channelsWholesale{get; set;} 
    public List <Investor_Channel__c> channelsMiniCorrespondent{get; set;} 
    public List <Investor_Channel__c> channelsCorrespondentAOTDirectTrade{get; set;} 
    public List <Investor_Channel__c> channelsCorrespondentBestEfforts{get; set;} 
    public List <Investor_Channel__c> channelsCorrespondentMandatoryBulkFlow{get; set;}
    public List <Investor_Channel__c> channelsCorrespondentNonDelegated{get; set;} 
    public List <Investor_Channel__c> channelsCorrespondentNonDelMandatory{get; set;}  
     
    
    public Account accounts {get;set;} 
    
    public Account acc {get;set;}
    
    
    
    
    
    
    
    
    public extendAccountsChannel2(ApexPages.StandardController controller) {
        Id id = ApexPages.currentPage().getParameters().get('id');
        
        
        if(ApexPages.currentPage().getParameters().get('id') != null){
            
           id accRecId = [select id from Account where id = :id].id;
           
           
            if(accRecId != null){
                channels = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Retail' AND Investor_Status__c = 'Active' LIMIT 1];
                channelsWholesale = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Wholesale' LIMIT 1];  
                channelsMiniCorrespondent = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Mini Correspondent' LIMIT 1];
                channelsCorrespondentAOTDirectTrade = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent AOT / Direct Trade' LIMIT 1]; 
                channelsCorrespondentBestEfforts = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Best Efforts' LIMIT 1]; 
                channelsCorrespondentMandatoryBulkFlow = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Mandatory (Bulk/Flow)' LIMIT 1]; 
                channelsCorrespondentNonDelegated = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non Delegated' LIMIT 1];
                channelsCorrespondentNonDelMandatory = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non-Del Mandatory' LIMIT 1];
                
                
                 
            }
        }
        
        
        
    }
    
}
 
@isTest
private class extendAccountsChannel2_Test{   
    static testMethod void extendAccountsChannel2_channels(){
        
        Account aa = new Account();
        aa.name='TestInvestor';
        insert aa;
        
           
        Investor_Channel__c ic = new Investor_Channel__c();
        ic.Channel__c ='Retail';
        ic.Account_Name__c = aa.Id;
        insert ic;
        
        //Verify that records were created
    for(Investor_Channel__c channels : [SELECT Id FROM Investor_Channel__c WHERE Account_Name__r.id = :aa.Id AND Channel__c ='Retail'LIMIT 1]){
          
    }    
}
}
  • February 06, 2020
  • Like
  • 0
hi, i have the follwing class and a VF page that will show the results if records are found. If there are no records for any query, then i see an error:

List has no rows for assignment to SObject
An unexpected error has occurred. Your development organization has been notified.

How can i modify the code to display a message in VF when there are no records returned? this will need to be for each query. Any help is appreciated! thanks!

CLASS:
public class extendAccountsChannel2 { 
    public Investor_Channel__c channels{get; set;} 
    public Investor_Channel__c channelsWholesale{get; set;} 
    public Investor_Channel__c channelsMiniCorrespondent{get; set;} 
    public Investor_Channel__c channelsCorrespondentAOTDirectTrade{get; set;} 
    public Investor_Channel__c channelsCorrespondentBestEfforts{get; set;} 
    public Investor_Channel__c channelsCorrespondentMandatoryBulkFlow{get; set;}
    public Investor_Channel__c channelsCorrespondentNonDelegated{get; set;} 
    public Investor_Channel__c channelsCorrespondentNonDelMandatory{get; set;}   
    
    public Account accounts {get;set;} 
    
    public Account acc {get;set;}
    
    public extendAccountsChannel2(ApexPages.StandardController controller) {
        Id id = ApexPages.currentPage().getParameters().get('id');
        if(ApexPages.currentPage().getParameters().get('id') != null){
            
           id accRecId = [select id from Account where id = :id].id;
            if(accRecId != null){
                channels = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Retail'];
                channelsWholesale = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Wholesale'];  
                channelsMiniCorrespondent = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Mini Correspondent']; 
                channelsCorrespondentAOTDirectTrade = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent AOT / Direct Trade']; 
                channelsCorrespondentBestEfforts = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Best Efforts']; 
                channelsCorrespondentMandatoryBulkFlow = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Mandatory (Bulk/Flow)']; 
                channelsCorrespondentNonDelegated = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non Delegated'];
                channelsCorrespondentNonDelMandatory = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non-Del Mandatory'];
                
                 
            }
        }
        
        
        
    }
    
}




VF:
 
<apex:page standardController="Account" extensions="extendAccountsChannel2"> <style> .activeTab {background-color: #003366; color:white; background-image:none;} .inactiveTab { background-color: lightgrey; color:black; background-image:none;} input.btn[name="del"] { display: none; } input.btn[name="clone"] { display: none; } input.btn[name="edit"] { display: none; } </style> 

<apex:tabPanel switchType="ajax" id="theTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab" > <apex:tab label="Correspondent AOT / Direct Trade" name="name4" id="tabFour" style="background-color: white;" > <apex:detail subject="{!channelsCorrespondentAOTDirectTrade}" relatedList="false" /> </apex:tab> <apex:tab label="Correspondent Best Efforts" name="name5" id="tabFive" style="background-color: white;" > <apex:detail subject="{!channelsCorrespondentBestEfforts}" relatedList="false" /> </apex:tab> <apex:tab label="Correspondent Mandatory (Bulk/Flow)" name="name6" id="tabSix" style="background-color: white;" > <apex:detail subject="{!channelsCorrespondentMandatoryBulkFlow}" relatedList="false" /> </apex:tab> <apex:tab label="Correspondent Non Delegated" name="name7" id="tabSeven" style="background-color: white;" > <apex:detail subject="{!channelsCorrespondentNonDelegated}" relatedList="false" /> </apex:tab> <apex:tab label="Correspondent Non-Del Mandatory" name="name8" id="tabEight" style="background-color: white;" > <apex:detail subject="{!channelsCorrespondentNonDelMandatory}" relatedList="false" /> </apex:tab> <apex:tab label="Mini Correspondent" name="name3" id="tabThree" style="background-color: white;" > <apex:detail subject="{!channelsMiniCorrespondent}" relatedList="false" /> </apex:tab> <apex:tab label="Retail" name="name1" id="tabOne" style="background-color: white;" > <apex:detail subject="{!channels}" relatedList="false" /> </apex:tab> <apex:tab label="Wholesale" name="name2" id="tabTwo" style="background-color: white;" > <apex:detail subject="{!channelsWholesale}" relatedList="false" /> </apex:tab> </apex:tabPanel> <br/> </apex:page>

 
  • January 29, 2020
  • Like
  • 0
This is the javascript we have for a button on the opportunity. Can anyone help with converting this to lightning, please?


if('{!Opportunity.Related_Contract__c}'!=''&&'{!Opportunity.Type_of_Contract__c}' != 'Addendum'){ 
alert("Sorry, a Contract record has already been created for this opportunity. You can view the Contract by clicking on the Related Contract link in the Contract/Amendment Details section."); 

else if('{!Opportunity.Related_Amendment__c}'!=''&&'{!Opportunity.Type_of_Contract__c}' == 'Addendum'){ 
alert("Sorry, an Amendment record has already been created for this opportunity. You can view the Amendment by clicking on the Related Amendment link in the Contract/Amendment Details section."); 


else if('{!Opportunity.Type_of_Contract__c}' == ''){ 
alert("Please enter a Type of Contract before requesting a Contract or Addendum."); 

else if('{!URLENCODE(Opportunity.Contact__c)}' == ''){ 
alert("Please enter a Contract Contact before requesting a Contract or Addendum."); 

else if(!('{!Opportunity.Type_of_Contract__c}'=='')&&'{!Opportunity.Has_Banker_PPE_Service__c}'>0&&('{!Opportunity.Cost_Per_Additional_User__c}'==''||'{!Opportunity.Users__c}'=='')){ 
alert("This opportunity has a Banker PPE service. Before requesting a Contract or Addendum, please provide the number of Users and the Cost per Additional User in the Contract Details section."); 

else if('{!Opportunity.Type_of_Contract__c}' == 'Addendum'){ 
window.open ( "/a4u/e?saveURL={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}&00N38000003rUFs={!Opportunity.Name}&CF00N38000003rUFn={!Opportunity.Name}&CF00N38000003rUFn_lkid={!Opportunity.Id}&CF00N38000003rUFd={!Opportunity.Related_Contract__c}&CF00N38000003rUFd_lkid={!Opportunity.Related_ContractId__c}","_top"); 

else{ 
window.open ( "/800/e?saveURL={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}&00N38000003Hm3a={!Opportunity.Type_of_Contract__c}&Name={!Opportunity.Name}&ctrc40={!Opportunity.Contract_Term__c}&00N38000003Hj9L={!Opportunity.Renewal_Term_months__c}&00N38000003Hm4E=1&CF00N50000002bj33={!Opportunity.Name}&CF00N50000002bj33_lkid={!Opportunity.Id}&ctrc15=New&ctrc7={!URLENCODE(Opportunity.Account_Name_TEXT__c) }&ctrc7_lkid={!Opportunity.AccountId}","_top"); 
}
  • May 14, 2019
  • Like
  • 0
Hi, we wnat to migrate to lightning but one of our issues is the use of javascript and validation. Can anyone show be how to get a button or action in Lighting for the following? I have read articles, but we validate fields with javascript and also determine what kind of record to create based on picklist selection. Please help if possible, thanks!

if('{!Opportunity.Related_Contract__c}'!=''&&'{!Opportunity.Type_of_Contract__c}' != 'Addendum'){ 
alert("Sorry, a Contract record has already been created for this opportunity. You can view the Contract by clicking on the Related Contract link in the Contract/Amendment Details section."); 
}
else if('{!Opportunity.Related_Amendment__c}'!=''&&'{!Opportunity.Type_of_Contract__c}' == 'Addendum'){ 
alert("Sorry, an Amendment record has already been created for this opportunity. You can view the Amendment by clicking on the Related Amendment link in the Contract/Amendment Details  section."); 
}

else if('{!Opportunity.Type_of_Contract__c}' == ''){
alert("Please enter a Type of Contract before requesting a Contract or Addendum."); 
}
else if('{!Opportunity.Contact__c}' == ''){
alert("Please enter a Contract Contact before requesting a Contract or Addendum."); 
}
else if(!('{!Opportunity.Type_of_Contract__c}'=='')&&'{!Opportunity.Has_Banker_PPE_Service__c}'>0&&('{!Opportunity.Cost_Per_Additional_User__c}'==''||'{!Opportunity.Users__c}'=='')){
alert("This opportunity has a Banker PPE service. Before requesting a Contract or Addendum, please provide the number of Users and the Cost per Additional User in the Contract Details section.");

else if('{!Opportunity.Type_of_Contract__c}' == 'Addendum'){
window.open ( "/a4u/e?saveURL={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}&00N38000003rUFs={!Opportunity.Name}&CF00N38000003rUFn={!Opportunity.Name}&CF00N38000003rUFn_lkid={!Opportunity.Id}&CF00N38000003rUFd={!Opportunity.Related_Contract__c}&CF00N38000003rUFd_lkid={!Opportunity.Related_ContractId__c}","_top");
}
else{
window.open ( "/800/e?saveURL={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}&00N38000003Hm3a={!Opportunity.Type_of_Contract__c}&Name={!Opportunity.Name}&ctrc40={!Opportunity.Contract_Term__c}&00N38000003Hj9L={!Opportunity.Renewal_Term_months__c}&00N38000003Hm4E=1&CF00N50000002bj33={!Opportunity.Name}&CF00N50000002bj33_lkid={!Opportunity.Id}&ctrc15=New&ctrc7={!URLENCODE(Opportunity.Account_Name_TEXT__c) }&ctrc7_lkid={!Opportunity.AccountId}","_top");
}
  • June 13, 2018
  • Like
  • 0
HI, looking for some help to send an email. We need to send an email to a list of contacts where Role__c (custom) = Primary when an Asset related to the same Account moves to Status = Implementation Complete.

1. how can i get the list of contacts to send to?
2. How can i identify the template to use?
3. What is the best way to trigger the email? Can it be done with process builder?

the list of contacts should not exceed 10, but need to send the email to all Primary contacts related to the same account the asset is related to.

Any help would be much appreciated! Thanks!
  • September 13, 2017
  • Like
  • 0
Hello, I would like to create a button or link to create a content Delivery with preset values. I found this delivered Idea, but not able to find any examples on how to use. Can anyone help with an example of how to do this, please?

With Winter '15, the Content Delivery API will allow users to create Content Deliveries for both Chatter and Content files and set all the parameters available via UI like passwords and expiration dates.
  • March 02, 2017
  • Like
  • 0
Hi, can anyone help me with creating a trigger to add default text in the Description field if a particular record type has been chosen? I reasearched and it indicates should be a before insert trigger. So the idea is, click New Case, select XXX Record Type, click continue, case edit page opens with "QQQ" defaulted text in the Description field. Can anyone advise, please? Thanks!
  • December 13, 2016
  • Like
  • 0
Hi, I need to create a button that will be used on an opportunity record to create a new related record. But i want this button to determine which record type to use based on if the logged in user is the opportunity owner. I don't have a clue how to write javascript to make this happen, can anyone help?

Here is what works in a regular button:
/a4J/e?
saveURL={!Opportunity.Id}
&retURL=%2F{!Opportunity.Id}
&RecordType=012W00000008qvd
&CF00NW0000000wUyk={!Opportunity.Name}
&ent=Partner

But, that is just for when Opportunity Owner Id does not equal User Id. I need to create a similar record, but change the record type if Opportunity Owner ID does equal Used Id. Ideally would like it to work from just one button.

Thanks!
  • August 03, 2016
  • Like
  • 0
Hi, 
We have an Account child object call Client Fact Sheet. What I would like to do is list all Contacts related to the Account and show that list on the Client Fact Sheet page layout. I thought this can be done with a Visualforce page displayed on the layout. Can someone outline what should be done to achieve this? Thanks!
  • November 12, 2015
  • Like
  • 0
Hi, I have a custom object and one section on the page layout has about 123 fields. Would like to organize these fields in a table/grid pattern instead of the standard page layout 2 column design. Any ideas how to achieve this and have it editable, too?
  • October 23, 2015
  • Like
  • 0
I need help creating a list of contacts that are related to an account that is related to a case. I would like to show this list of contacts on the case page layout. I thought it could be done with visualforce, if so would definitely need help creating the code. It would be great if it can be done without VF, any ideas? Thanks!
  • October 13, 2015
  • Like
  • 0
hi, we have a community and we do not want our commununity users to post to their own feed, rather in a group feed. Reason is because we monitor groups but don't follow individuals so might miss a post. So, i reserached in chatter forums and found this trigger, was told that it will do what we want. 

I am not a coder, so can someone please reveiw the code and let me know if it will do what we want? And, I am having trouble locating out Community ID. I am assuming that NetworkScope is community ID???? so need help finding that too. Lastly, can someone help me with a unit test for this, please?

Thanks very much!!!

Sample Code:

trigger FilterOnChatterPost on FeedItem (before insert) {
for (FeedItem feeditems: trigger.new)
{
if (string.valueOf(feeditems.ParentId).startsWith('005') && feeditems.NetworkScope== '0DBB000000008t2OAA')
{
feeditems.addError('You are only allowed to post the message to Discussion Groups’);
}
}
}
  • October 06, 2015
  • Like
  • 0
Hi, i need help creating a custom detail button on the case object. It need to only be clickable ar funcational when Case.Status = Assigned. If the user clicks on it and case status does not equal assigned, then it needs a pop up or something saying just that. If case status equals assigned, then would like the button to direct to another page "www.salesforce.com" (example)  and also a pop up that says, case has been processed.

If something like this doable?

Thanks, CJ
  • September 29, 2015
  • Like
  • 0
Hi, i want to create a contact when a new user is created. I tried process builder and trigger but get the following error (trigger):

MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa):Contact, original object: User: []: Trigger.NewContactOnUser: line 19, column 1

Here is the code:

trigger NewContactOnUser on User (before insert) {
    List<Contact> contacts = new List<Contact>();
    for (User u: trigger.new){
        Contact c = new Contact();
        c.FirstName = u.FirstName;
        c.LastName = u.LastName;
        c.Email = u.Email;
        c.MailingStreet = u.Street;
        c.MailingCity = u.City;
        c.MailingState = u.State;
        c.MailingCountry = u.Country;
        c.MailingPostalCode = u.PostalCode;
        c.Title = u.Title;
        c.Phone = u.Phone;
        c.AccountID = '001W000000JgPzp';       
        
        contacts.add(c);       
    }
    insert contacts;


Can anyone help fix this or any ideas to create a contact from a user record?

Thanks!
 
  • September 22, 2015
  • Like
  • 0
i need a visualforce page that will display opportunity products on a case. When an opportuntity is closed/won a Case is created (for implementing the product just sold), all related to the Account record. I would like the show the Opportunity Line items on that Case layout.

Any ideas on how this can be done? Any help would be appreciated since I am not a VF expert. Thanks!
  • July 27, 2015
  • Like
  • 0
Hi, this is VF code form the Mass Edit Cases from App Exchange. Can anyone help me with code to set it to where it sorts by Development Priority ASC? It doesn't have to toggle, just always load that way. Thanks!


<apex:page standardController="Case" recordSetVar="unused" sidebar="false">
<apex:includeScript value="{!$Resource.UtilJS}" />
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlock >
Note: All modifications made on the page will be lost if Return button is clicked without clicking the Save button first.
</apex:pageBlock>
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Return" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!selected}" var="a" id="table">
<apex:column headerValue="Case Number">
<apex:inputField value="{!a.CaseNumber}"/>
</apex:column>
<apex:column headerValue="Subject">
<apex:inputField value="{!a.Subject}"/>
</apex:column>
<apex:column headerValue="Status">
<apex:inputField value="{!a.Status}"/>
</apex:column>
<apex:column headerValue="Development  Priority">
<apex:inputField value="{!a.Development_Priority__c}"/>
</apex:column>
<apex:column headerValue="Business Priority">
<apex:inputField value="{!a.Customer_AM_Requested_Priority__c}"/>
</apex:column>
<apex:column headerValue="Case Rank">
<apex:inputField value="{!a.Case_Rank__c}"/>
</apex:column>
<apex:column headerValue="Type">
<apex:inputField value="{!a.Type}"/>
</apex:column>
<apex:column headerValue="Description">
<apex:inputField value="{!a.Description}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
 
  • June 04, 2015
  • Like
  • 0
Is there a time zone setting that can be set once and will automatically be adjusted when the time changes from Daylight to Standard time? All timestamps were behind by an hour after this past weekend. I changed default settings form Central Standard Time to Central Daylight Time. I would like it to be automatically adjusted to accomodate the change. Kind of like you don't have change your phone clock, it just happens!

Any ideas?
  • March 11, 2015
  • Like
  • 1
We can create a case from email using the Salesforce for Outlook side panel, but I can't figure out how to add the record type field selection. Chatter publisher actions are enbaled. What am i missing?

I read this article https://help.salesforce.com/apex/HTViewSolution?id=000192820&language=en_US (https://help.salesforce.com/apex/HTViewSolution?id=000192820&language=en_US) that says if the Case object has record types, then a record type field will show up. Record types are available to the users profile, can select from within Saleforce. Hoping someone can help!
  • January 26, 2015
  • Like
  • 0
Is there a time zone setting that can be set once and will automatically be adjusted when the time changes from Daylight to Standard time? All timestamps were behind by an hour after this past weekend. I changed default settings form Central Standard Time to Central Daylight Time. I would like it to be automatically adjusted to accomodate the change. Kind of like you don't have change your phone clock, it just happens!

Any ideas?
  • March 11, 2015
  • Like
  • 1
hi, i have a flow that counts all of the assets related to account and updates a number field on the account. This works for new assets but i am not able to launch the flow if an asset is deleted. I am understanding that a trigger can be created to do this, maybe after delete? I need to pass the AccountId of the deleted asset into the flow. i researched and found a sample flow code.

the scenario would be a user deletes an asset record which triggers the flow to count all the assets related to the same account the deleted asset was related to, and then update a number field on the account with the new value. Any help is greatly appreciated, thanks!
 
Flow.Interview flow = new Flow.Interview.MyFlowApiName(new map<String,Object> 
                                                {'vAccountId' => aId});     
flow.start();
  • March 18, 2020
  • Like
  • 0
hi, i have an extention controller and a test method but i am only able to achieve 13 % converage, 3/23. This code is just queries and sending the output to a visualforce page. Can anyone please explain what i need to test for to get 100% coverage? And an example woudl be helpful too, please. Thank you!

controller:
public extendAccountsChannel2(ApexPages.StandardController controller) {
        Id id = ApexPages.currentPage().getParameters().get('id');
        
        
        if(ApexPages.currentPage().getParameters().get('id') != null){
            
           id accRecId = [select id from Account where id = :id].id;
           
           
            if(accRecId != null){
                channels = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Retail' AND Investor_Status__c = 'Active' LIMIT 1];
                channelsWholesale = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Wholesale' LIMIT 1];  
                channelsMiniCorrespondent = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Mini Correspondent' LIMIT 1];
                channelsCorrespondentAOTDirectTrade = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent AOT / Direct Trade' LIMIT 1]; 
                channelsCorrespondentBestEfforts = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Best Efforts' LIMIT 1]; 
                channelsCorrespondentMandatoryBulkFlow = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Mandatory (Bulk/Flow)' LIMIT 1]; 
                channelsCorrespondentNonDelegated = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non Delegated' LIMIT 1];
                channelsCorrespondentNonDelMandatory = [SELECT Id from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non-Del Mandatory' LIMIT 1];
                
                
                 
            }
        }
        
        
        
    }
    
}

test:
 
@isTest
private class extendAccountsChannel2_Test{   
    static testMethod void extendAccountsChannel2_channels(){
        
        Account aa = new Account();
        aa.name='TestInvestor';
        insert aa;
        
        //Create Retail Channel   
        Investor_Channel__c ic = new Investor_Channel__c();
        ic.Channel__c ='Retail';
        ic.Investor_Status__c = 'Active';
        ic.Account_Name__c = aa.Id;
        insert ic;
        
        //Create Wholesale Channel   
        Investor_Channel__c ic2 = new Investor_Channel__c();
        ic2.Channel__c ='Wholesale';
        ic2.Account_Name__c = aa.Id;
        insert ic2;
        
        //Create Mini Correspondent Channel   
        Investor_Channel__c ic3 = new Investor_Channel__c();
        ic3.Channel__c ='Mini Correspondent';
        ic3.Account_Name__c = aa.Id;
        insert ic3;
        
        //Create Correspondent AOT / Direct Trade   
        Investor_Channel__c ic4 = new Investor_Channel__c();
        ic4.Channel__c ='Correspondent AOT / Direct Trade';
        ic4.Account_Name__c = aa.Id;
        insert ic4;
                
           

        ApexPages.StandardController sc = new ApexPages.StandardController(aa);
        extendAccountsChannel2 testAccPlan = new extendAccountsChannel2(sc);
         
        PageReference pageRef = Page.Investor_Channel_Tabs; // Add your VF page Name here
        Test.setCurrentPage(pageRef);
            
         
        //Verify that records were created
   List <Investor_Channel__c> channels = [SELECT Id FROM Investor_Channel__c WHERE Account_Name__r.id = :aa.Id AND Channel__c ='Retail'LIMIT 1];
    
      
        System.assert( channels  != null);
  
    
    
    List <Investor_Channel__c> channelsWholesale = [SELECT Id FROM Investor_Channel__c  WHERE Account_Name__r.id = :aa.Id AND Channel__c ='Wholesale'LIMIT 1];
          System.assert( channelsWholesale != null);
    
    
    List <Investor_Channel__c> channelsMiniCorrespondent = [SELECT Id FROM Investor_Channel__c  WHERE Account_Name__r.id = :aa.Id AND Channel__c ='Mini Correspondent'LIMIT 1];
          System.assert( channelsMiniCorrespondent != null);
          
          List <Investor_Channel__c> channelsCorrespondentAOTDirectTrade = [SELECT Id FROM Investor_Channel__c  WHERE Account_Name__r.id = :aa.Id AND Channel__c ='Correspondent AOT / Direct Trade'LIMIT 1];
          System.assert( channelsCorrespondentAOTDirectTrade != null);
    
    
    
        
}
}

​​​​​​​
  • March 03, 2020
  • Like
  • 0
hi, i have an apex class that just runs querries. I am trying to write the test class but failing to get any coverage. First of all, i am not too sure what i am testing here, just creating an account and a custom object related record, then query for it. My current test passes, but my controller still shows 0/23 code coverage? Any help much appreciated, thanks!
controller:

public class extendAccountsChannel2 { 
    public List <Investor_Channel__c> channels{get; set;} 
    public List <Investor_Channel__c> channelsWholesale{get; set;} 
    public List <Investor_Channel__c> channelsMiniCorrespondent{get; set;} 
    public List <Investor_Channel__c> channelsCorrespondentAOTDirectTrade{get; set;} 
    public List <Investor_Channel__c> channelsCorrespondentBestEfforts{get; set;} 
    public List <Investor_Channel__c> channelsCorrespondentMandatoryBulkFlow{get; set;}
    public List <Investor_Channel__c> channelsCorrespondentNonDelegated{get; set;} 
    public List <Investor_Channel__c> channelsCorrespondentNonDelMandatory{get; set;}  
     
    
    public Account accounts {get;set;} 
    
    public Account acc {get;set;}
    
    
    
    
    
    
    
    
    public extendAccountsChannel2(ApexPages.StandardController controller) {
        Id id = ApexPages.currentPage().getParameters().get('id');
        
        
        if(ApexPages.currentPage().getParameters().get('id') != null){
            
           id accRecId = [select id from Account where id = :id].id;
           
           
            if(accRecId != null){
                channels = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Retail' AND Investor_Status__c = 'Active' LIMIT 1];
                channelsWholesale = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Wholesale' LIMIT 1];  
                channelsMiniCorrespondent = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Mini Correspondent' LIMIT 1];
                channelsCorrespondentAOTDirectTrade = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent AOT / Direct Trade' LIMIT 1]; 
                channelsCorrespondentBestEfforts = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Best Efforts' LIMIT 1]; 
                channelsCorrespondentMandatoryBulkFlow = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Mandatory (Bulk/Flow)' LIMIT 1]; 
                channelsCorrespondentNonDelegated = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non Delegated' LIMIT 1];
                channelsCorrespondentNonDelMandatory = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non-Del Mandatory' LIMIT 1];
                
                
                 
            }
        }
        
        
        
    }
    
}
 
@isTest
private class extendAccountsChannel2_Test{   
    static testMethod void extendAccountsChannel2_channels(){
        
        Account aa = new Account();
        aa.name='TestInvestor';
        insert aa;
        
           
        Investor_Channel__c ic = new Investor_Channel__c();
        ic.Channel__c ='Retail';
        ic.Account_Name__c = aa.Id;
        insert ic;
        
        //Verify that records were created
    for(Investor_Channel__c channels : [SELECT Id FROM Investor_Channel__c WHERE Account_Name__r.id = :aa.Id AND Channel__c ='Retail'LIMIT 1]){
          
    }    
}
}
  • February 06, 2020
  • Like
  • 0
hi, i have the follwing class and a VF page that will show the results if records are found. If there are no records for any query, then i see an error:

List has no rows for assignment to SObject
An unexpected error has occurred. Your development organization has been notified.

How can i modify the code to display a message in VF when there are no records returned? this will need to be for each query. Any help is appreciated! thanks!

CLASS:
public class extendAccountsChannel2 { 
    public Investor_Channel__c channels{get; set;} 
    public Investor_Channel__c channelsWholesale{get; set;} 
    public Investor_Channel__c channelsMiniCorrespondent{get; set;} 
    public Investor_Channel__c channelsCorrespondentAOTDirectTrade{get; set;} 
    public Investor_Channel__c channelsCorrespondentBestEfforts{get; set;} 
    public Investor_Channel__c channelsCorrespondentMandatoryBulkFlow{get; set;}
    public Investor_Channel__c channelsCorrespondentNonDelegated{get; set;} 
    public Investor_Channel__c channelsCorrespondentNonDelMandatory{get; set;}   
    
    public Account accounts {get;set;} 
    
    public Account acc {get;set;}
    
    public extendAccountsChannel2(ApexPages.StandardController controller) {
        Id id = ApexPages.currentPage().getParameters().get('id');
        if(ApexPages.currentPage().getParameters().get('id') != null){
            
           id accRecId = [select id from Account where id = :id].id;
            if(accRecId != null){
                channels = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Retail'];
                channelsWholesale = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Wholesale'];  
                channelsMiniCorrespondent = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Mini Correspondent']; 
                channelsCorrespondentAOTDirectTrade = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent AOT / Direct Trade']; 
                channelsCorrespondentBestEfforts = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Best Efforts']; 
                channelsCorrespondentMandatoryBulkFlow = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Mandatory (Bulk/Flow)']; 
                channelsCorrespondentNonDelegated = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non Delegated'];
                channelsCorrespondentNonDelMandatory = [SELECT Id,name from Investor_Channel__c WHERE Account_Name__r.id= :accRecId AND Channel__c = 'Correspondent Non-Del Mandatory'];
                
                 
            }
        }
        
        
        
    }
    
}




VF:
 
<apex:page standardController="Account" extensions="extendAccountsChannel2"> <style> .activeTab {background-color: #003366; color:white; background-image:none;} .inactiveTab { background-color: lightgrey; color:black; background-image:none;} input.btn[name="del"] { display: none; } input.btn[name="clone"] { display: none; } input.btn[name="edit"] { display: none; } </style> 

<apex:tabPanel switchType="ajax" id="theTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab" > <apex:tab label="Correspondent AOT / Direct Trade" name="name4" id="tabFour" style="background-color: white;" > <apex:detail subject="{!channelsCorrespondentAOTDirectTrade}" relatedList="false" /> </apex:tab> <apex:tab label="Correspondent Best Efforts" name="name5" id="tabFive" style="background-color: white;" > <apex:detail subject="{!channelsCorrespondentBestEfforts}" relatedList="false" /> </apex:tab> <apex:tab label="Correspondent Mandatory (Bulk/Flow)" name="name6" id="tabSix" style="background-color: white;" > <apex:detail subject="{!channelsCorrespondentMandatoryBulkFlow}" relatedList="false" /> </apex:tab> <apex:tab label="Correspondent Non Delegated" name="name7" id="tabSeven" style="background-color: white;" > <apex:detail subject="{!channelsCorrespondentNonDelegated}" relatedList="false" /> </apex:tab> <apex:tab label="Correspondent Non-Del Mandatory" name="name8" id="tabEight" style="background-color: white;" > <apex:detail subject="{!channelsCorrespondentNonDelMandatory}" relatedList="false" /> </apex:tab> <apex:tab label="Mini Correspondent" name="name3" id="tabThree" style="background-color: white;" > <apex:detail subject="{!channelsMiniCorrespondent}" relatedList="false" /> </apex:tab> <apex:tab label="Retail" name="name1" id="tabOne" style="background-color: white;" > <apex:detail subject="{!channels}" relatedList="false" /> </apex:tab> <apex:tab label="Wholesale" name="name2" id="tabTwo" style="background-color: white;" > <apex:detail subject="{!channelsWholesale}" relatedList="false" /> </apex:tab> </apex:tabPanel> <br/> </apex:page>

 
  • January 29, 2020
  • Like
  • 0
Hi, we wnat to migrate to lightning but one of our issues is the use of javascript and validation. Can anyone show be how to get a button or action in Lighting for the following? I have read articles, but we validate fields with javascript and also determine what kind of record to create based on picklist selection. Please help if possible, thanks!

if('{!Opportunity.Related_Contract__c}'!=''&&'{!Opportunity.Type_of_Contract__c}' != 'Addendum'){ 
alert("Sorry, a Contract record has already been created for this opportunity. You can view the Contract by clicking on the Related Contract link in the Contract/Amendment Details section."); 
}
else if('{!Opportunity.Related_Amendment__c}'!=''&&'{!Opportunity.Type_of_Contract__c}' == 'Addendum'){ 
alert("Sorry, an Amendment record has already been created for this opportunity. You can view the Amendment by clicking on the Related Amendment link in the Contract/Amendment Details  section."); 
}

else if('{!Opportunity.Type_of_Contract__c}' == ''){
alert("Please enter a Type of Contract before requesting a Contract or Addendum."); 
}
else if('{!Opportunity.Contact__c}' == ''){
alert("Please enter a Contract Contact before requesting a Contract or Addendum."); 
}
else if(!('{!Opportunity.Type_of_Contract__c}'=='')&&'{!Opportunity.Has_Banker_PPE_Service__c}'>0&&('{!Opportunity.Cost_Per_Additional_User__c}'==''||'{!Opportunity.Users__c}'=='')){
alert("This opportunity has a Banker PPE service. Before requesting a Contract or Addendum, please provide the number of Users and the Cost per Additional User in the Contract Details section.");

else if('{!Opportunity.Type_of_Contract__c}' == 'Addendum'){
window.open ( "/a4u/e?saveURL={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}&00N38000003rUFs={!Opportunity.Name}&CF00N38000003rUFn={!Opportunity.Name}&CF00N38000003rUFn_lkid={!Opportunity.Id}&CF00N38000003rUFd={!Opportunity.Related_Contract__c}&CF00N38000003rUFd_lkid={!Opportunity.Related_ContractId__c}","_top");
}
else{
window.open ( "/800/e?saveURL={!Opportunity.Id}&retURL=%2F{!Opportunity.Id}&00N38000003Hm3a={!Opportunity.Type_of_Contract__c}&Name={!Opportunity.Name}&ctrc40={!Opportunity.Contract_Term__c}&00N38000003Hj9L={!Opportunity.Renewal_Term_months__c}&00N38000003Hm4E=1&CF00N50000002bj33={!Opportunity.Name}&CF00N50000002bj33_lkid={!Opportunity.Id}&ctrc15=New&ctrc7={!URLENCODE(Opportunity.Account_Name_TEXT__c) }&ctrc7_lkid={!Opportunity.AccountId}","_top");
}
  • June 13, 2018
  • Like
  • 0
HI, looking for some help to send an email. We need to send an email to a list of contacts where Role__c (custom) = Primary when an Asset related to the same Account moves to Status = Implementation Complete.

1. how can i get the list of contacts to send to?
2. How can i identify the template to use?
3. What is the best way to trigger the email? Can it be done with process builder?

the list of contacts should not exceed 10, but need to send the email to all Primary contacts related to the same account the asset is related to.

Any help would be much appreciated! Thanks!
  • September 13, 2017
  • Like
  • 0
Hi, I need to create a button that will be used on an opportunity record to create a new related record. But i want this button to determine which record type to use based on if the logged in user is the opportunity owner. I don't have a clue how to write javascript to make this happen, can anyone help?

Here is what works in a regular button:
/a4J/e?
saveURL={!Opportunity.Id}
&retURL=%2F{!Opportunity.Id}
&RecordType=012W00000008qvd
&CF00NW0000000wUyk={!Opportunity.Name}
&ent=Partner

But, that is just for when Opportunity Owner Id does not equal User Id. I need to create a similar record, but change the record type if Opportunity Owner ID does equal Used Id. Ideally would like it to work from just one button.

Thanks!
  • August 03, 2016
  • Like
  • 0
Hi, i want to create a contact when a new user is created. I tried process builder and trigger but get the following error (trigger):

MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa):Contact, original object: User: []: Trigger.NewContactOnUser: line 19, column 1

Here is the code:

trigger NewContactOnUser on User (before insert) {
    List<Contact> contacts = new List<Contact>();
    for (User u: trigger.new){
        Contact c = new Contact();
        c.FirstName = u.FirstName;
        c.LastName = u.LastName;
        c.Email = u.Email;
        c.MailingStreet = u.Street;
        c.MailingCity = u.City;
        c.MailingState = u.State;
        c.MailingCountry = u.Country;
        c.MailingPostalCode = u.PostalCode;
        c.Title = u.Title;
        c.Phone = u.Phone;
        c.AccountID = '001W000000JgPzp';       
        
        contacts.add(c);       
    }
    insert contacts;


Can anyone help fix this or any ideas to create a contact from a user record?

Thanks!
 
  • September 22, 2015
  • Like
  • 0
Hi, this is VF code form the Mass Edit Cases from App Exchange. Can anyone help me with code to set it to where it sorts by Development Priority ASC? It doesn't have to toggle, just always load that way. Thanks!


<apex:page standardController="Case" recordSetVar="unused" sidebar="false">
<apex:includeScript value="{!$Resource.UtilJS}" />
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlock >
Note: All modifications made on the page will be lost if Return button is clicked without clicking the Save button first.
</apex:pageBlock>
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Return" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!selected}" var="a" id="table">
<apex:column headerValue="Case Number">
<apex:inputField value="{!a.CaseNumber}"/>
</apex:column>
<apex:column headerValue="Subject">
<apex:inputField value="{!a.Subject}"/>
</apex:column>
<apex:column headerValue="Status">
<apex:inputField value="{!a.Status}"/>
</apex:column>
<apex:column headerValue="Development  Priority">
<apex:inputField value="{!a.Development_Priority__c}"/>
</apex:column>
<apex:column headerValue="Business Priority">
<apex:inputField value="{!a.Customer_AM_Requested_Priority__c}"/>
</apex:column>
<apex:column headerValue="Case Rank">
<apex:inputField value="{!a.Case_Rank__c}"/>
</apex:column>
<apex:column headerValue="Type">
<apex:inputField value="{!a.Type}"/>
</apex:column>
<apex:column headerValue="Description">
<apex:inputField value="{!a.Description}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
 
  • June 04, 2015
  • Like
  • 0
Hi, I need some help creating a trigger to change the Lead Owner to a user from a custom lookup field also on the Lead object. This is for when a new Lead record is created and the Lead Source is a certain value. Thanks!
  • January 14, 2015
  • Like
  • 0