• itsaws11
  • NEWBIE
  • 0 Points
  • Member since 2013

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

Hi Guys,

 

 

Please help me to access the tokenid from salesforce and secret key  inorder  to login to facebook from salesforce.??

 

Regards,

Itsaws

Hi folks,

 

I am passing my username thrugh url using encrption.But during fetching of url(from second page) it is unable to decrpt username.Please help me on this.Follow the below code which aceess the "https://c.ap1.visual.force.com/apex/MySecondPage?username=r+6QYqHGBsbrkKDopBSy6i3v2JykazW2+C4YBSoK5Z4%3D" url from second page.

                               public String Valueone{get;set;}

                               Valueone = ApexPages.currentPage().getParameters().get('username');
                               Blob b64dcrypted = EncodingUtil.base64Decode(Valueone);
                               Blob cryptoKey = Crypto.generateAesKey(128);
                               Blob decryptedData = Crypto.decryptWithManagedIV('AES128', cryptoKey, b64dcrypted);
                               System.debug('>>>>>>>>>>>>>>>>>>>>>>>>>>>>' + decryptedData.toString() );

this codd shows me the following message.(Even I have pass algorithmName as AES128,AES192,AES256 but facing same problem)

System.SecurityException: Input length must be multiple of 16 when decrypting with padded cipher .

 

Regards,

Itsaws11

public class AssignPartnerOnBoarding{ 
    public void AssignOwnerToPartnerOnBoarding(list<Form__c> lstPOB){
        map<string,Id> mapProgramNameAndQueueId = new map<string,id>();
        list<Group> lstQueue = new list<Group>();
        set<string> setProgramName = new set<string>();
        if(!lstPOB.isEmpty()){
            for(Form__c pob:lstPOB){
                if(pob.Program_Name_formula__c != null && pob.Program_Name_formula__c != ''){
                    setProgramName.add(pob.Program_Name_formula__c);
                }
            }
            if(!setProgramName.isEmpty()){
                lstQueue = [Select Id,Name,Type from Group where Name in: setProgramName and Type = 'Queue'];
                if(!lstQueue.isEmpty()){
                    for(Group programQueue: lstQueue){ 
                        mapProgramNameAndQueueId.put(programQueue.Name,programQueue.Id);
                    }
                }
            }
            if(!mapProgramNameAndQueueId.isEmpty()){
                for(Form__c pob: lstPOB){
                    if(mapProgramNameAndQueueId.containsKey(pob.Program_Name_formula__c)){
                        if(mapProgramNameAndQueueId.get(pob.Program_Name_formula__c) != null){
                            pob.OwnerId = mapProgramNameAndQueueId.get(pob.Program_Name_formula__c);
                        }
                    }
                }
            }
        }
    }
}
  • October 15, 2013
  • Like
  • 0

I  have a series of workflow rules associated with Task objects, and I would like these to also trigger field updates on my account details...

 

Any way to get this done?

 

In advance, thanks for your help...