• Santosh Kumar 275
  • NEWBIE
  • 80 Points
  • Member since 2016

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 27
    Replies
Hi,
Can anyone help me with this scenario?
What Exactly,  if( a.phone!= trigger.oldmap.get(a.id).phone) line does in the below scenario. What does it mean?


trigger contactUpdate_acc on Account (after update) {
    list<contact> ctc =new list<contact>();
    list<account> acc = new list<Account>();
    for(Account a:trigger.new){
        if( a.phone!= trigger.oldmap.get(a.id).phone){
            acc.add(a);
        }
    }
}
Hi,

I have two custom objects Project_sheet_2 and Project_checklist, they both have a look up to Opportunity.
On the Poject_sheet_2 VF page I would like to display all the associated Project_checklist objects and vice versa.
I'm holding the Opporutnity ID in a variable(projSheet.PS2_Opportunity__c) as I'm also displaying the Opportunity Product Items.
I have the following code on my Project Sheet controller, which I thought should work.....

public List<Project_Checklist__c> getOppChecklists(){
        List<Project_Checklist__c> lstChecklists = [SELECT Name,(SELECT name FROM Poject_checklist__R) FROM Opportunity WHERE ID =:projSheet.PS2_Opportunity__c];      
        return lstChecklists;
}

Many thanks
Hi
Can we use visualforce custom component in all types of Email Template i.e Text, HTML (Using Letterhead), Custom (Without Letterhead) or Visualforce email template.
I have only tried with Visualforce Email Template. 
Can anyone please let me know that can we use in other Email templates also?
Thanks in Advance..
Hi Team,

I am asked to develop a contact us page which includes some feilds and when ever a user submits an email has to be sent to a particular person (admin like person) with those feilds .

 how to acheive this through apex.

KIndly help me 
Hi,

Could someone please help me with this code ? I am trying to paramterize the code and passing the feild name from another table but this is not working Px.vtype.Field_Name__c
​    public PageReference Submit() {
    //----------------------- Code to validate Patient Sevice file ---------------------    
        for(PatientServices__c Px: PSUpload )
        {    
            for (PHI_Configuration__c PC :[Select Field_Name__c,Validation_Type__c, Order__c from PHI_Configuration__c where Table_Name__c ='PHI__c' ])
            {
                for( String vtype :PC.Validation_Type__c.split(';')){
                    if(vtype='Null Value Check')
                        isNullValue(Px.vtype.Field_Name__c);    
                }
            }    
        }
        return null;
    }

 
Hi all,

Inbound email:
if you get any Inbound email from external user to salesforce.
if that email is existing record in contact then go and create case for that
if that email is not exist then automatically send email like this
your email id is not registered please register with us.

please solve immediately and how to write trigger on above requirement

thanks 
arun
Hi, I have two customer fields in Custom Object:

- Representative - lookup to User object
 - Customer – lookup to Contacts object

Need to do that pair of Representative+Customer will be unique. I create unique text field and add workflow rules that any insert or update will add to text field by formula: Representative__r.Id & Customer.Id.
Every time when I add or edit record with the same Representative or Customer display error : 

"Error: Invalid Data. 
Review all error messages below to correct your data.
Duplicate value on record: TC-0032 (Related field: UniqueTextField)"
I no need that Representative wiil be unique or Customer separately. I need to a unique couple of these values.
How to fix it?
 
Hi guys,

I'm new to Apex and I am trying to create a trigger that creates a duplicate record called Section_2_Balance_Sheet on a Contacts record, if a checkbox called Joint_c is true. 

I have created a lookup field on the contact record which looks up to contacts. If this lookup field is populated I'd like this clients name to automatically populate the Client_c field in the Section_2_Balance_Sheet record.

Is this possible? 
Hi,
Can anyone help me with this scenario?
What Exactly,  if( a.phone!= trigger.oldmap.get(a.id).phone) line does in the below scenario. What does it mean?


trigger contactUpdate_acc on Account (after update) {
    list<contact> ctc =new list<contact>();
    list<account> acc = new list<Account>();
    for(Account a:trigger.new){
        if( a.phone!= trigger.oldmap.get(a.id).phone){
            acc.add(a);
        }
    }
}
Hi,
I have created a simple Soql Query to Query a list of Properties 
public class PropertiesUptown {
Public List<McLabs2__Property__c> getPropertiesUptown() {
       List<McLabs2__Property__c> PropertiesUptown=[Select Name,Primary_Contact_Name__c,McLabs2__Loan_Balance__c,Loan_Origination_Date_v2__c,McLabs2__Loan_Maturity_Date__c
                                                                 From McLabs2__Property__c
                                                                 Where CustomField = Test
                                                                 And CustomField = Test2];
                                                                                          
        return PropertiesUptown;
}
}

That Query Works just fine when I use it. However, When trying to test it for deployment, I cant seem to get my test to work. 

This is my test class.
@isTest
public class PropertiesUptownTest 
{ 
    public static testMethod void TestSOQL() 
    {
        McLabs2__Property__c prop = new McLabs2__Property__c();
        // Add all required field
        prop.Activity_Notes__c='test';
        insert prop;


        PropertiesUptown testCont = new PropertiesUptown ();
        List<McLabs2__Property__c> lstProperty = testCont.getPropertiesUptown();
        
        System.assert( lstProperty != null);
        
    }
}

When I run this test, Code Coverage stays at none. Why would this be happening?

Any help is appreciated.

Thank you
This is more of a general question than anything, but I recently inherited a Salesforce admin/developer position at this company and there is a high amount of clutter and errors throughout the system. What I've noticed more than anything else is the "Too many SOQL queries:101" error. It seems to stem most often from conflicts between process builder workflows and apex classes/triggers currently in production. The issue is that I did not personally write any of these classes or triggers and the error messages don't exactly give a clear solution. Basically, what are the most common causes of this error and what is (most often) the best way to resolve it?
I have read that we can update parent object from the child record  using workflows provioded the relrionship is Master detail.However, when i checked the  opporunity field I saw that opporunutity and acount have look up relationship then how come i am abl to update account from the opp object when releationship is look up between them.

Is there something that I am missing?

if the relationship is mater detail between them ,Can i see that in the system?

Please help,
Thanks
formula field date1-date2.if date1 or date2  is not enterd formula fied should display 0.00.please help me
 
Hi All,

Email notification when delegated task is complete.:
For the above requirement i have written a one trigger on Task object.That trigger working as expected.But here my problem is template structure as of now we are using standard template but when assigned the task they will get like this mail.

Task Email content does not reference to actual task
 
I got below email, which looks to be not correct
 
-----Original Message-----
From: ABC (ABC Connections)
Sent: Friday, April 29, 2016 4:42 PM
To: XYZ (ABC Connections)
Subject: A task has been updated
 
Hello ABC,
Your task has been Completed. Here are the details -
 
Subject -Test of Auto Email
Status - Completed
Priority - Normal
 
This should have been followed standard template like below 
 
To: ABC
 
XYZ has updated the following new task:
 
Subject: Test of Auto Email
Opportunity: test11
Status - Completed 
Priority: Normal
 
For more details, click the following link:
 
https://my.salesforce.com/00T22000001nTBP

Can please any one help above template

Thanks in Advance

 
  • May 02, 2016
  • Like
  • 0