• kavya rao neelagiri
  • NEWBIE
  • 25 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
Hi ,

I need help on the following requirement below as follows,

I have a text field called as "Latest Period date" which stores the value as March - 2017

I want another formula field which should capture a value which is 3 months prior to latest period date

for eg

if Latest period date is March -2017

then the formula field should hold Jan - 2017

if its jan 2017 

then the formula field should hold Oct - 2016

Kindly help me with the formula please

Thanks in Advance
Hi ,

I need help on the following requirement below as follows,

I have a text field called as "Latest Period date" which stores the value as March - 2017

I want another formula field which should capture a value which is 3 months prior to latest period date

for eg

if Latest period date is March -2017

then the formula field should hold Jan - 2017

if its jan 2017 

then the formula field should hold Oct - 2016

Kindly help me with the formula please

Thanks in Advance
Hi All,

I'm not able to see some values under the case status field. Attached a couple of screencast links,
Link 1 - These are the picklist values I selected (https://www.screencast.com/t/V1YChP7O)
Link 2 - When I click the case status dropdown, I'm not able to see the selected values (https://www.screencast.com/t/jgjsvlrU)

Also, I enabled the "Show closed status in case of status field" under support settings. Still, I can't the desired result, what I'm missing here?

Very much appreciate your replies.
Thank you all!

System.DmlException: Upsert failed. First exception on row 0; first error: STRING_TOO_LONG, password: data value too large: *** encrypted text *** (max length=15): [password__c]


while inserting a encrypted field as password



public class newformcntrl {

     public account accs{get;set;}
     public string id{set;get;}
   public account acc{get;set;}
    Blob cryptoKey = Blob.valueOf('380db410e8b11fa9');

    

    public newformcntrl (ApexPages.StandardController controller) 
    {

        accs=(account)Controller.getRecord();
        id=apexpages.currentpage().getparameters().get('id');

    }
    
    
     public pagereference savee()
    {   
          if(accs.password__c!=null)
          {
             Blob data = Blob.valueOf(accs.password__c);
             Blob encryData = Crypto.encryptWithManagedIV('AES128', cryptoKey , data );
             String bData = EncodingUtil.base64Encode(encryptedData);
             accs.password__c= bData;


             Blob dta3 = EncodingUtil.base64Decode(accs.password__c);
             Blob decryptedData = Crypto.decryptWithManagedIV('AES128', cryptoKey , dta3);
             String dryptData = decryptedData.toString();


          }

        upsert accs;
        pagereference p=new pagereference('/apex/newaccview?id='+acc.id);
        p.SetRedirect(true); 
        return p;
    }
   

}
Hello,

I have trigger that will update a custom field Segment__c on the account based on the owner Role Description. I'm getting this error when I change the owner of the account to someone in the Operations department:
Error: Apex trigger SegmentRulesTrigger caused an unexpected exception, contact your administrator: SegmentRulesTrigger: execution of AfterUpdate

caused by: System.ListException: Duplicate id in list:

Here is the part of the trigger that is not working:
trigger SegmentRulesTrigger on Account (after insert, after update) {
    
    //Create a list of accounts to update 
    List<Account> acctsListToUpdate = new List<Account>(); 
   
   
	//check if trigger is running again
    if(RecursiveTriggerHandler.runOnce()){
    
        for (Account a : Trigger.new) {
         //Query the owner role description
			for(User u : [SELECT id, Role_Description__c FROM User WHERE id = :a.OwnerId]){
				// Check if the account ID is not null 
				// to avoid "referencing null object" error       
				if(a != NULL  && a.ID !=NULL){
				// create a placeholder account a1    
				Account a1  = new Account(Id = a.Id, Name = a.Name, OwnerId = a.OwnerId);
				
					//Map Account ID
					Account oldAcct = Trigger.oldMap.get(a1.Id);
									//Check if Account Owner or Name has changed
								   if (oldAcct.OwnerId != a1.OwnerId || oldAcct.Name != a1.Name){
									//  User u1 = new User(Id= u.Id, Role_Description__c = u.Role_Description__c);
										//Check if Owner role description is Operations
									   if( u.Role_Description__c == 'Operations' )
											 {
											  a1.Segment__c = 'Other';
											  acctsListToUpdate.add(a1); 
										}
											 a1.Segment__c = u.Role_Description__c;
											 acctsListToUpdate.add(a1); 
									 } 
								
				} 
                //Bulkify the update    
                if(acctsListToUpdate.size()>0){
                    update acctsListToUpdate;            
                } 
			}				
		}	
	}
}

Thank you for your help.​
Hi Friends,

I am new to salesforce developing . I  have a custom MQL date / time field in CONTACT and LEAD object . 

I need to create a trigger on campaign member when a new contact / lead assign as a campaign member and check the MQL field in CONTACT / LEAD object is null or not and campaign member status is RESPONDED or not ? If Status is Responded we need to update the MQL field with current date time . 
Please Help me to write the code. I don't know how to write the code. Please provide the logic. 

Thanks for Advance.