• jason.wan
  • NEWBIE
  • 0 Points
  • Member since 2010

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

We have a sites URL http://ourcompany.force.com/XYZZY  Some users are trying to access http://ourcompany.force.com/xyzzy and they are getting thrown to a generic page not found.

 

I could put in a redirect from http://ourcompany.force.com/xyzzy to http://ourcompany.force.com/XYZZY but that would work only for that one specific case.  If a user tried http://outcompany.force.com/XYzzy they would still get a page not found.

 

Is there any way to make a sites URL case insensitive or have some sort of case-insenstitve redirect?

I don't understand why I get this error when the limit for callouts is normally 10 per transaction.

 

I am calling the following code with 1 record as a test.  The createObject() method will make 2 callouts.

 

global class S3Batchable implements Database.Batchable<CF_Purchase_Order__c>, Database.AllowsCallouts { List<CF_Purchase_Order__c> orders; global S3Batchable(List<CF_Purchase_Order__c> o){ orders = o.clone(); } global Iterable<CF_Purchase_Order__c> start(Database.batchableContext BC){ return orders; } global void execute(Database.BatchableContext BC, CF_Purchase_Order__c[] scope){ List<CF_Purchase_Order__c> ordersToUpdate = new List<CF_Purchase_Order__c>(); VF_SiteUploadController controller; boolean result; for(CF_Purchase_Order__c order : scope){ controller = new VF_SiteUploadController(order.id); controller.body = Blob.valueof(order.Script__c); controller.fileName = order.Partner__r.Final_Cut_Filename__c+'_'+order.SPON__c+'_Script.txt'; controller.fileSize = controller.body.size(); controller.bucketName='FCSinbound'; result = controller.createObject(); if(result){ order.CFNotes__c = controller.fileDownloadURL; ordersToUpdate.add(order); } } update ordersToUpdate; } global void finish(Database.BatchableContext BC){ Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); mail.setToAddresses(new String[] {'gnewman@spotzer.com'}); mail.setReplyTo('batch@acme.com'); mail.setSenderDisplayName('Batch Processing'); mail.setSubject('Batch Process Completed'); mail.setPlainTextBody('Batch Process has completed'); Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }); } public static testMethod void testBatch() { List<CF_Purchase_Order__c> myTestOrders = [select id from CF_Purchase_Order__c limit 5]; S3Batchable scriptBatch = new S3Batchable(myTestOrders); ID batchprocessid = Database.executeBatch(scriptBatch); } }

 

Hi ,
is there any way to login from one Salesforce.com org into another Salesforce.com org using Apex. Actually, i have written one Apex class and wanted to login into a different SFDC org from that class.

Please post me if anyone have any solution.

Thanks in advance,
NG