• anu.s1.3587621171560732E12
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies

Hi all,

 

I am new for salesforce coding,

I have a problem,

I want to encrypt a value in apex

also I want to reverse a string using apex code.

Hi,

 

I just uploaded 3000 more lead records in my salesforce instance. After insersion I find out the duplicate lead records with same phone number.now i want to delete the duplicate records based on phone number and also Industry criteria.

is it possible to do using do while loop in the trigger.if it is  possible means please send me an example code.

Hi

 

Iam trying to write a test class for a trigger.am getting error.

 

trigger copyrecord on Opportunity (after update) 
{
 List<Opportunity> liopp = new List<Opportunity>();
 List<Won_opportunity__c> wonlist = new List<won_opportunity__c>();
 won_opportunity__c won;
 for(Opportunity opp :[select Name,StageName,Account.Name,Segment1__c,Sector__c,Courses__c,
     CloseDate,LeadSource,contact__r.Name,probability,people__c,Region1__c
      from Opportunity where Id IN : trigger.new])
      {
         if(opp.StageName == 'Closed Won')
             {
              won = new won_opportunity__c();
              won.Stage__c = opp.StageName;
              won.close_Date__c = opp.CloseDate;
              won.Name = opp.Name;
              won.Region__c = opp.Region1__c;
              won.segment__c = opp.segment1__c;
              won.Courses__c = opp.courses__c;
              won.Lead_source__c = opp.LeadSource;
              won.Probability__c = opp.Probability;
              won.people__c = opp.people__c;
              won.Account_Name__c = opp.Account.Name;
              won.Contact__c = opp.Contact__r.Name;             
              won.sector__c = opp.sector__c;      
              wonlist.add(won);
             }    
      }
     insert wonlist;
}

 Here is my test case

 

@istest(seealldata = false)
public class testcopyrecord_trigger {

public static testMethod void updrec(){

Account acc = new Account();
acc.Name = 'Test';
insert acc;

List<opportunity> opp = new List<opportunity>();

for(Integer i=0;i<5;i++){
opportunity o= new opportunity();
o.AccountId = acc.Id;
o.stage = 'Closed/Won';
opp.add(o);
}
insert opp;
opp[0].Stage=true;
update opp;
}
}

 So Am getting the following error

 

Error: Compile Error: Variable does not exist: Name at line 7 column 1

 

please help me 

 

Hi All,

 

I want to create a visual force page to get logged in users list.

suppose if I am the manager,if I login to the salesforce instance and i want to view the users list under me or who are reporting to me.

first of all in  my salesforce instance I have more than 1000 users.I wanted to display all the users list and in that if i click on any user,he can able to view the users reporting to him.if no one is reporting him then only his name should be displayed.

 

can anyone help me 

Hi,

 

I just uploaded 3000 more lead records in my salesforce instance. After insersion I find out the duplicate lead records with same phone number.now i want to delete the duplicate records based on phone number and also Industry criteria.

is it possible to do using do while loop in the trigger.if it is  possible means please send me an example code.

Hi All,

 

I want to create a visual force page to get logged in users list.

suppose if I am the manager,if I login to the salesforce instance and i want to view the users list under me or who are reporting to me.

first of all in  my salesforce instance I have more than 1000 users.I wanted to display all the users list and in that if i click on any user,he can able to view the users reporting to him.if no one is reporting him then only his name should be displayed.

 

can anyone help me 

I need examples for the foll:

1) How to create Sample HelloWorld WebService using Apex?.

2) How to generate WSDL for this Sample HelloWorld WebService ?. 

3) How to consume that Sample HelloWorldWebService in VisualForce page?..

 

Any Help would be appreciated.