• Prasad Kasote
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies

Hello there.

 I have got a simple request and i don't know where I am going wrong:

Account has a field named: Case_Contact___c.id (its Contact lookup) and want this same Contact name updated pn all Account related Case:ContactName (lookup) field using class. 

Class written:

public class updateCaseContactFieldFromAcc {
    
    public static void updateCaseList (list <Contact> ConList){
    List <Contact> lstContact = [select Account.id,Name from Contact where id in: ConList];
    List<Account> lstAccount =[select Case_Contact__r.id from Account where Case_Contact__r.id in: Conlist ];
    List<case> lstCase = [select Contact.id, Account.Id from Case where Account.id in: lstAccount];
        }
              for(contact c: ConList){
                for(Account a: lstAccount){ 
                 for(case ca: lstCase){ 
                    ca.Contact.ID = c.Id;
           } 
         }
       }update lstCase;
     }
}

---------------------

trigger on Contact:

trigger updateCaseContactFieldFromAccTrigger1 on Contact (before insert, before update) {
    updateCaseContactFieldFromAcc.updateCaseList(trigger.new); }

and this does not work.

I got an advice from expert stating 3 lists is not a Good practice and need to use Map here, but dont kow how to proceed.

Any help guys ?

I have data coming from API in one Single field: 
Customer Information : Ben Matthew, Xtream. Inc., benmatthew@Xtream.com

I want to update this value in 3 different fields on a different object:
Name = Ben Matthew
Company = Xtream. Inc.
Email - benmatthew@xtream.com

how do I go about doing this?

Any help will be highly appreciated.
there is a lookup to contact on Opportunity.
I have created a process to reference opportunity picklist field with picklist on contact updated in the contact lookup on Opportunity.

but when I convert lead with 'do not create new lead upon conversion' unchecked I get below error:
Error: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3010Y000000h0z0. Flow error messages: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.: [] Class.leadconvert.BulkLeadConvert.handleOpportunityInserts: line 740, column 1 Class.leadconvert.BulkLeadConvert.convertLead: line 104, column 1.

I realized this is due to the process builder hence deactivating the process builder allows me to convert lead.
But I wish to reference the Opportunity picklist with picklist of Contact updated on the contact lookup field on Opportunity, so when lead is converted in to contact the contact picklist value is updated on Opportunity picklist.

previously referencing picklist wasn't possible with workflows but after summer15 Process builder came in and we can reference picklist. but seems we cannot do this using process too.
 

Hello there.

 I have got a simple request and i don't know where I am going wrong:

Account has a field named: Case_Contact___c.id (its Contact lookup) and want this same Contact name updated pn all Account related Case:ContactName (lookup) field using class. 

Class written:

public class updateCaseContactFieldFromAcc {
    
    public static void updateCaseList (list <Contact> ConList){
    List <Contact> lstContact = [select Account.id,Name from Contact where id in: ConList];
    List<Account> lstAccount =[select Case_Contact__r.id from Account where Case_Contact__r.id in: Conlist ];
    List<case> lstCase = [select Contact.id, Account.Id from Case where Account.id in: lstAccount];
        }
              for(contact c: ConList){
                for(Account a: lstAccount){ 
                 for(case ca: lstCase){ 
                    ca.Contact.ID = c.Id;
           } 
         }
       }update lstCase;
     }
}

---------------------

trigger on Contact:

trigger updateCaseContactFieldFromAccTrigger1 on Contact (before insert, before update) {
    updateCaseContactFieldFromAcc.updateCaseList(trigger.new); }

and this does not work.

I got an advice from expert stating 3 lists is not a Good practice and need to use Map here, but dont kow how to proceed.

Any help guys ?

I have data coming from API in one Single field: 
Customer Information : Ben Matthew, Xtream. Inc., benmatthew@Xtream.com

I want to update this value in 3 different fields on a different object:
Name = Ben Matthew
Company = Xtream. Inc.
Email - benmatthew@xtream.com

how do I go about doing this?

Any help will be highly appreciated.

I have recently started using the new Developer Console quite a bit. It's a great tool, but I am experiencing an error that I have never seen before when using it: 

 

Organization Administration Locked

The changes you requested require salesforce.com to temporarily lock your organization's administration setup. However, the administration setup has already been locked by another change. Please wait for the previous action to finish, then try again later. 

 

When this happens a lock is placed on an Apex class and I cannot edit it.  Any idea how to get out of this locked state? I have tried logging out of Salesforce and logging back in again multiple times.

  • October 31, 2012
  • Like
  • 0

Hi All

 

I'm trying to add a field of type Formula to a custom object and I'm getting the following error when I hit 'save' at the end of the new field wizard:

 



Validation Errors While Saving Record(s)

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Formula has no columnType". 

 

I can't find doumentation of this error.

Please does anyone know what does this error mean and what can be the cause of it?

 

Mant thanks

 

 

  • November 04, 2011
  • Like
  • 0

I have a custom Account Related List which shows a M:M relationship(custom object) between Accounts and Contacts.  I currently have a formula field defined on the custom object which displays the Contact's phone number.  The formula is defined as TEXT.

 

My understanding is the "click to dial" is automatically enabled for fields defined as PHONE. 

 

How can I make the formula field mimic the PHONE datatype "click to dial" funtionality?

 

 

  • October 03, 2011
  • Like
  • 0