• taaa
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 17
    Questions
  • 18
    Replies

Hello,

 

I have created formula field on Position object, which is pulling some data from User object.

 

I have Market picklist in User objeck, having value: NA,EMEA and Global

 

But the problem is formula field is taking only last picklist value i.e Global even though in user;s object Market is set as NA.

 

My formula is: IF(ISPICKVAL( $User.Market_NES__c , "NA"), "NA", IF(ISPICKVAL( $User.Market_NES__c , "EMEA"), "EMEA",IF(ISPICKVAL( $User.Market_NES__c , "Global"), "Global", NULL)))

 

I tried this also,

 

TEXT($User.Market_NES__c)

 

Still Global is coming in formula.

 

 

Please help.

 

Thanks

  • October 08, 2013
  • Like
  • 0

A Developer has added a custom object to an application. Which additional feature will become available by default for the object in the application? Choose 3

A) Quick create
B) Custom reporting
C) Recent items
D) Create new sidebar component
E) Search

  • September 02, 2013
  • Like
  • 0

Hello,

 

Do anyone is having idea, how much amount be refunded if I cancel my schedule exam of DEV-401?

 

Thanks,

Taani

  • August 30, 2013
  • Like
  • 0
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
  • August 28, 2013
  • Like
  • 0

Hi,

 

I stucked in this problem,

 

Suppose there are 2 territory, A and B

 

User who belongs to territory A, are able to see the user from Territory B. Please help me how to restrict this.

 

Thanks

Taani

  • July 23, 2013
  • Like
  • 0

Hello Everyone,

 

I stucked with a very weired thing. Standard functionality of Data.com in salesforce working fine in desktop, however same functionality is not working in IPAD. Under Industry, no add button is there in IPAD. 

 

Is there any way to get all data.com records and dispalyed in VF page??

 

Any suggestion would be appreciated.

 

thanks

 

 

 

  • December 17, 2012
  • Like
  • 0

Hi,

 

I have one custom object "Award", and there is lookup on award to Opportunity, In opportunity there is Product related list. What my require ment is, when user choose Opportunity from award, all products related to that Opportunity should attach to Award. 

 

i wrote code for this, however it is attaching only one product to award(updated one), please help me in this,

 

trigger trg_HAS_AssociateProductToAwardStagePO_AI_AU on Award__c (after insert,after update) {
//list<Award__c> awd= new list<Award__c>();
set<string> setId = new set<string>();
for(Award__c aw:trigger.new){
if(aw.Stage__c == 'Email Commitment' ) {
setId.add(aw.Opportunity__c);
system.debug('@@@@@'+setID);
}
}


//List<Product__c> pdt = [Select Id,Name,Opportunity__c, Award__c from Product__c where Opportunity__c IN: setId];
map<string,Product__c > pdtmap= new Map<string,Product__c>();
List<Product__c> pdt = new List<Product__c>();
for (Product__c obj :[Select Id,Name,Opportunity__c, Award__c from Product__c where Opportunity__c IN: setId]) {
pdtmap.put(obj.Opportunity__c ,obj);
}
Product__c prd = new Product__c();
for(Award__c aw1:trigger.new){

if(pdtmap.containskey(aw1.Opportunity__c)) {
//prd = new Product__c(id=pdtmap.get(aw1.Opportunity__c).id);
//prd = new Product__c(Opportunity__c=pdtmap.get(aw1.Opportunity__c).id);
prd = new Product__c();
prd.Opportunity__c = aw1.Opportunity__c;
prd.Award__c = aw1.Id;
pdt.add(prd);
}
}
if(pdt.size() > 0 ) {
insert pdt;

}
System.debug('pdt '+pdt);

}

 

 

 

 

Thanks

  • December 01, 2012
  • Like
  • 0

HI All,

 

I have been screwed up from the last 2 days, need help on this, in the DEV env the following code is working fine:

 

trigger trg_HAS_InfluencerAssociationWithOpportunity_AU_BU on Lead (after update)
{
Map<Id, Id> influencer2OppId = new Map<Id, Id>();
List<Opportunity> lstopp = new List<Opportunity>();
Set<Id> leadIds = new Set<Id>();

for (Integer i = 0; i < Trigger.new.size(); i++){
if (Trigger.new[i].IsConverted == true && Trigger.old[i].isConverted == false
){
{
influencer2OppId.put(Trigger.new[i].id,Trigger.new[i].convertedOpportunityId);
}
Opportunity oppty = new Opportunity(Id=Trigger.new[i].ConvertedOpportunityId);
oppty.Name=Trigger.new[i].Title;
oppty.CloseDate = System.Today().addmonths(6);
System.debug('@@@@@@@@@@@@@@  : '+oppty.CloseDate);


//oppty.StageName='Need Analysis(0%)';
lstopp.add(oppty);
}
System.debug('################  : '+lstopp);
update lstopp;

List<Influencer__c> influ = [select lead__c, opportunity__c from Influencer__c where lead__c in :influencer2OppId.keySet()];
for (Influencer__c f : influ)
{
f.check__c=false;
f.opportunity__c = influencer2OppId.get(f.lead__c);

}
update influ;

}

}

 

After deploy in ConfigDEV, I am getting error while conversion "Isuuficient Privilage", now then, I commented the bold line above in which I am updating close Date of Opportunity with 6 months ahead. it worked fine!

 

However I need that updation, so I wrote one workflow to update, again I got the same error while conversion. (While creating OPP with new button, it works fine)

 

Where I am missing?

 

Please help me in this.

 

Thanks A lot!

  • November 28, 2012
  • Like
  • 0

HI, 

 

I am unable to convert the lead..getting error: 

Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. 

 

Please tell me what could be done.

Note: I am system admin.

 

Thanks..

  • November 26, 2012
  • Like
  • 0

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;

}

  • November 20, 2012
  • Like
  • 0

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..

  • November 06, 2012
  • Like
  • 0

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!

  • November 06, 2012
  • Like
  • 0

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();

}

 

  • November 05, 2012
  • Like
  • 0

Hi,

 

I am having a Custom object Influencer and it has relationship between Lead. On the Influencer pagelayout Lead lookup is there. When I am creating Influencer from lead, lead name is being populated on the Influencer page layout correspondly,and formula associated with lead is working fine on the influencer.

 

But the problem is when I am removing the Lead from Infulencer Pagelayout, Lead value didnt populated and hence formula associated with that doesnt work.

 

Any idea, to get the ID from the URL itself when influencer created directly from Lead, as we get ID in the URL from navigation thru Lead.

 

Regards

  • November 02, 2012
  • Like
  • 0

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

  • October 26, 2012
  • Like
  • 0

Hi All,

 

Below pasted are my code for VF page, but it is not saved. What to do? Value mapped but when I am saving, it is refreshing the page,

 

VF page:

<apex:page standardController="Contact" extensions="ContactExtension" >

<apex:form >
<apex:outputPanel id="scriptRefresh">

<script type="text/javascript">

function readonly(input) {

if(input){

document.getElementById('{!$Component.pgBlock.chkboxRefresh.SiteAddRefresh}').style.visibility = 'visible';
document.getElementById('{!$Component.pgBlock.pbsRefresh.pbsiMailst.txtMail_Str}').disabled = true;
document.getElementById('{!$Component.pgBlock.pbsRefresh.pbsiMailcity.txtMail_city}').disabled = true;
document.getElementById('{!$Component.pgBlock.pbsRefresh.pbsiMailState.txtMail_State}').disabled = true;
document.getElementById('{!$Component.pgBlock.pbsRefresh.pbsiMailPcode.txtMail_PCode}').disabled = true;
document.getElementById('{!$Component.pgBlock.pbsRefresh.pbsiMailcountry.txtMail_Country}').disabled = true;

}
else {
document.getElementById('{!$Component.pgBlock.chkboxRefresh.SiteAddRefresh}').style.visibility = 'hidden';
document.getElementById('{!$Component.pgBlock.pbsRefresh.pbsiMailst.txtMail_Str}').disabled = false;
document.getElementById('{!$Component.pgBlock.pbsRefresh.pbsiMailcity.txtMail_city}').disabled = false;
document.getElementById('{!$Component.pgBlock.pbsRefresh.pbsiMailState.txtMail_State}').disabled = false;
document.getElementById('{!$Component.pgBlock.pbsRefresh.pbsiMailPcode.txtMail_PCode}').disabled = false;
document.getElementById('{!$Component.pgBlock.pbsRefresh.pbsiMailcountry.txtMail_Country}').disabled = false;

}

}

</script>

</apex:outputPanel>

<apex:pageBlock mode="edit" id="pgBlock">

<apex:actionFunction action="{!showAccount}" name="mydispayAccount" reRender="SiteAddRefresh,scriptRefresh" >
<apex:param name="accDisply" assignto="{!accDisply}" value="" />
</apex:actionFunction>

<apex:actionFunction action="{!UpdateContact}" name="myAction" reRender="pbsRefresh" oncomplete="readonly(true);">
<apex:param name="acc" assignto="{!acc}" value="" />
</apex:actionFunction>



<apex:pageBlockSection title="Address Information" id="chkboxRefresh" Columns="2">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Select address from existing address " />
<input id="checkbox" type="checkbox" onclick="readonly(this.checked);" />
</apex:pageBlockSectionItem>

<apex:outputPanel style="visibility:hidden" id="SiteAddRefresh">
<apex:outputLabel value="Site Address" style="font-weight:bold;padding-right:15px;font-size: 91%;color: #4A4A56;text-align: left;font-family: Arial,Helvetica,sans-serif;" />
<apex:inputField value="{!contList.Site_Address__c}" onchange="myAction(this.value);" /><br/>
</apex:outputPanel>

</apex:pageBlockSection>
<apex:pageBlockSection columns="2" id="pbsRefresh">


<apex:pageBlockSectionItem id="pbsiMailst">
<apex:outputLabel value="MailingStreet" />
<apex:inputField value="{!contList.MailingStreet}" id="txtMail_Str" />
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem id="pbsiMailcity" >
<apex:outputLabel value="MailingCity" for="txtMail_city"/>
<apex:inputField value="{!contList.MailingCity}" id="txtMail_city"/>
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem id="pbsiMailState" >
<apex:outputLabel value="MailingState" for="txtMail_State"/>
<apex:inputfield value="{!contList.MailingState}" id="txtMail_State" />
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem id="pbsiMailPcode" >
<apex:outputLabel value="Mailing PostalCode" for="txtMail_PCode"/ >
<apex:inputfield value="{!contList.MailingPostalCode}" id="txtMail_PCode"/>
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem id="pbsiMailcountry" >
<apex:outputLabel value="Mailing Country" for="txtMail_Country"/>
<apex:inputfield value="{!contList.MailingCountry}" id="txtMail_Country"/>

</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>


</apex:pageBlock>
</apex:form>
</apex:page>

 

 

<---------------->

Controller:

public with sharing class ContactExtension{
// public String phone{get;set;}
public string acc{get;set;}

public string accDisply{get;set;}
public Account accList{get;set;}

public boolean siteAdd{get;set;}
public string MailingPostalCode1{get;set;}
Public List<Site_Address__c> lstSiteAddress ;
public Contact contList{get;set;}

public ContactExtension(ApexPages.StandardController controller) {
//siteAdd=false;
}


public void UpdateContact(){

Try {
contList = new Contact();
lstSiteAddress = [Select Account__c, Shipping_street__c, Shipping_State_Province__c,Shipping_Country__c, Shipping_city__c, Shipping_Zip_Postal_Code__c, Site_Number__c from Site_Address__c where name =: acc];
system.debug('TEST@@@@@@@@@@@'+lstSiteAddress);

contList.MailingStreet = lstSiteAddress[0].Shipping_street__c;

contList.MailingCity = lstSiteAddress[0].Shipping_city__c;
contList.MailingState = lstSiteAddress[0].Shipping_State_Province__c;
contList.MailingPostalCode =lstSiteAddress[0].Shipping_Zip_Postal_Code__c;
contList.MailingCountry = lstSiteAddress[0].Shipping_Country__c;
system.debug('TEST@@@@@@@@@@@'+MailingPostalCode1+' --------------'+lstSiteAddress);
}
catch(exception ext) {

system.debug('Test'+ext);
}


}

public void showAccount() {
system.debug('accDisply&&&&&&&'+accDisply);
if(accDisply=='true') {
// siteAdd =true;

} else {
// siteAdd=false;
}
}
}

 

Thanks,

Ayesha!

  • October 15, 2012
  • Like
  • 0

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,

 

  • October 03, 2012
  • Like
  • 0
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
  • August 28, 2013
  • Like
  • 0

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;

}

  • November 20, 2012
  • Like
  • 0

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..

  • November 06, 2012
  • Like
  • 0

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!

  • November 06, 2012
  • Like
  • 0

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();

}

 

  • November 05, 2012
  • Like
  • 0

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

  • October 26, 2012
  • Like
  • 0

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,

 

  • October 03, 2012
  • Like
  • 0

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