• taaa
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 17
    Questions
  • 18
    Replies
Please ans this quest.
 
A developer attempts to load data into the sandbox environment using the Data Loader GUI. The data load fails due to authentication issues.
 
What should the developer check to diagnose the problem? (Choose 2 answers)
 
A.      The password encryption settings
 
B.      The mapping file
 
C        The endpoint URL
 
D.      The user name
 
Any more suggestion will be appreciated as I am giving certification on coming week.
 
Thanks.
Taani

I have this (working) trigger:

 

trigger convertLeadToImplementationOpportunity on Lead (after update) {
    Set<Lead> leadsToConvert = new Set<Lead>();
    for (Lead lead : Trigger.new){
    	leadsToConvert.add(lead);
    }
    
	for(Lead lead : leadsToConvert){   
		     
	    if(lead.Status == 'Qualified' && !lead.isConverted && lead.isApproved__c == true){	    	
	    		        
	        Database.LeadConvert leadConvert = new database.LeadConvert();
	        LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true LIMIT 1];

            leadConvert.setConvertedStatus(convertStatus.MasterLabel); // ("Closed - Converted");
            leadConvert.setLeadId(lead.id);

	        Database.LeadConvertResult leadConvertResult = Database.convertLead(leadConvert);
	        System.assert(leadConvertResult.isSuccess());
	    }
    }
}

 

However, I want to specify (or set) each new Opportunity's record type and stage.

 

At the minimum, it's ok to rely on default SF behaviour, but for some reason my new Opportunities are currently created with "Closed - Lost" Stage, which is NOT the first Stage in my stages list.

 

For example purposes, let's say that I want the Opportunity to be created as a Record Type = "New Sale" and have a Stage = "First Presentation".

 

 

Hi,

 

I need to insert 100 records at atime, and this trigger doesnt work, please help me writing bulk trigger.

 

trigger emailcopy on Lead (before update, before insert) {

Lead ld = Trigger.new[0];
if(ld.Contact__c!=null&& ld.RecordTypeId == '012V00000008atT') {
Contact con = [Select id,Email,AccountId,Phone,Phone_Extension__c,MobilePhone from Contact where id =: ld.Contact__c];
Account acc = [Select id,AutomationandControlProductsRegion__c from Account where id =: con.AccountId];

ld.AutomationandControlProductsRegion__c = acc.AutomationandControlProductsRegion__c;
ld.Email = con.Email;
ld.Phone = con.Phone;
ld.PhoneExtension__c = con.Phone_Extension__c;
ld.MobilePhone =con.MobilePhone;

}

Hi, 

I have a trigger that create new OPP based on the criteria(in short it cloned that record with new name). I have product related list on Opp, what the requirement is, when record get cloned, the record in Product, should also get cloned and sit under the Related list of cloned Opp.

 

trigger trg_CreateOpportunityNAwardOnClosedStage_BU on Opportunity (before update) {

       if(!Validator_cls.hasAlreadyDone()){

      

if(Trigger.new[0].RecordTypeId == '012V00000008as6' && Trigger.new.size() == 1 && Trigger.old[0].StageName != Trigger.new[0].StageName && Trigger.new[0].StageName == 'Email Commitment/Closed Won (100%)') {

      

        Opportunity opp = new Opportunity();

        opp.Name = 'Renewed-'+Trigger.new[0].Name;

        opp.StageName = 'Need Analysis (0%) ';

        opp.RecordTypeId = '012V00000008as6';

        opp.AccountId = Trigger.new[0].AccountId;

        opp.CloseDate = System.Today().addmonths(6);

        insert opp;  

}

     Validator_cls.setAlreadyDone();

}

}

 

plz help..

Hi,

 

My Opp name is suppose "ABCD01", i want only "ABCD". How to get by using substring method.

 

Note: Opp name could be anything, not sure about the length. I want only last two numeric digit should be removed.

 

Thanx!

Hi,

 

I have a requirement, when Opportunity stage met with "closed won", i want cloned Opp with the name different. I got this, however autonumber I am not getting. 

 

For eg: I have a Opp name: Aux, when it met with the criteria, cloned Opp name should be "Aux Ren 1",again Aux met with the same criteria, cloned Opp name should be "AUX REN 2". 

 

here is my code:

trigger trg_CreateOpportunityNAwardOnClosedStage_BU on Opportunity (before update) {
if(!Validator_cls.hasAlreadyDone()){

if(Trigger.new[0].RecordTypeId == '012V00000008as6' && Trigger.new.size() == 1 && Trigger.old[0].StageName != Trigger.new[0].StageName && Trigger.new[0].StageName == 'Email Commitment/Closed Won (100%)') {
Trigger.new[0].check__c=true;

Opportunity opp = new Opportunity();

opp.Name = Trigger.new[0].Name +'Ren';
opp.StageName = 'Need Analysis (0%) ';
opp.RecordTypeId = '012V00000008as6';
opp.AccountId = Trigger.new[0].AccountId;
opp.CloseDate = System.Today().addmonths(6);
insert(opp);

}

 

Regards


}
Validator_cls.setAlreadyDone();

}

 

I am working on a VF page to display Account contacts in the Opportunity.  Within my class I have written a SOQL query to pull these contacts, but for some reason I can't reference the Opportunity.AccountID.  Within my query I am simply stating:

 

[select id, AccountID, FirstName, LastName, Phone, Email, Question_Answer__c, Role__c, Secondary_Role__c,Tertiary_Role__c, Create_Profile__c from Contact Where AccountID = :ApexPages.currentPage().getParameters().get('AccountID') ORDER BY LastName];

 

When I debug, the AccountID is passing as a null value.  

 

Any suggestions on how I can gather the Opportunity AccountID and use it within my select statement?

Hi,

 

I am adding one VF page in one section of Account pagelayout,it looks little odd, as the background color of VF is grey and rest is white, i want to make the background color of VF page equivalent to standard. Help me!

 

thanks

Hello,

 

My business requirement is "when user clicked on "New Button" on Account, then it should redirect to some other page", pls help me with the VF code for this action.

Thanks,

 

Hi,

 

I'm using the new styling, eg. Theme3. I'm building a custom editing page for my custom object, and I am using pageBlockSection but the sections look like the old styles (dark solid colors for the title bar, horizontal lines between fields, etc.) I've used the $User.UIThemeDisplayed to prove that "Theme3" is being returned. Am I missing something, or is VisualForce behind on this, or what? I thought the whole idea was my pages would look like the rest of the app.

Thanks for any help,

  Doug