• Vaibhav Shetti
  • NEWBIE
  • 10 Points
  • Member since 2016
  • Software Engineer


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 3
    Replies
Hi All,

I have a detailed page button to load a visualforce page in new window. I added this button to Lightning actions in page layout. So when I visit the record details in lightning and click on the button, it successfully loads the visualforce page and this page is in an iframe (with no src attribute) which salesforce automatically adds. Let's call this parent iframe. Further, the page has a javascript code/library loaded through static resource, which inturn loads an external page in another iframe with src link to say 'test.abc.com'. Let's call this child iframe. I see test.abc.com refused to connect in child iframe section. In console I see Refused to frame test.abc.com  because an ancestor violates the following Content Security Policy directive: frame-ancestors https://<mydomain>--<sandbox>.lightning.force.com". 

After reading through few articles, I whitelisted the domain of chilf iframe - 'https://test.abc.com' in Session Settings with 
Enable clickjack protection for customer Visualforce pages with standard headers - checked and  
Enable clickjack protection for customer Visualforce pages with headers disabled - unchecked.

I have also added 'https://test.abc.com' in Remote Site Settings. However, still I do not see contents loading with child iframe.

How can this be resolved?
I know -
base64Encode(inputBlob)
Converts a Blob to an unencoded String representing its normal form.

But what if I want the blob to be converted to base64 encoded string? Is there way for this?
I have been trying to upload a large file (maybe greater than 25MB) from Salesforce lightning to Google drive, referencing - https://developers.google.com/drive/api/v3/manage-uploads#resumable

However, I wasn't able to successfully complete it. Two questions -
1. What is the maximum file size Salesforce lightning can handle for upload?
2. Has anyone tried resumable Google drive upload?
I am using sforce.one.createRecord('Custom_Object__c') to create record of Custom_Object__c. When the record is created, I want to go back to the same page which launced Custom_Object__c record creation window. Using sforce.one.back()  like - 

sforce.one.createRecord('Custom_Object__c');
sforce.one.back();

closes the Custom_Object__c record creation window and takes back to previous page without allowing me to create record. How do I handle this? Am I missing something here?
I need to fetch ListViews and related filters, say for Account object. I know StandardSetContoller has methods - getListViewOptions() and getFilterId() methods which are helpful. However, the maximum record limit for StandardSetController is 10,000 records. In my case there are records more than 10,000. How do I implement this so that I can handle records more than 10,000?
I am trying to demonstrate batch apex in Eclipse Neon with Force.com IDE. Following is the code -

global class BatchApexDemoClass1 implements Database.Batchable<Sobject> {
 global Database.QueryLocator start(Database.BatchableContext bc) {
    return Database.getQueryLocator([Select LeadSource From Lead]);
 }

 global void execute(Database.BatchableContext bc, List<Lead> scope) {
    for (Lead Leads : scope) {
        Leads.LeadSource = 'Dreamforce';
    }
    update scope;
 }    

 global void finish(Database.BatchableContext bc) { 
    System.debug('Batch apex execution complete.');
 }    
}

However, when I save the code, I get the following errors-
- Save error: Class BatchApexDemoClass1 must implement the method: void Database.Batchable.finish(Database.BatchableContext)
- Save error: Class BatchApexDemoClass1 must implement the method: void Database.Batchable.execute(Database.BatchableContext, List)
- Offline Mode. File only saved locally, not to server
- Save error: Class BatchApexDemoClass1 must implement the method: System.Iterable Database.Batchable.start(Database.BatchableContext)

I don't know what am I missing in the code.
I need to fetch ListViews and related filters, say for Account object. I know StandardSetContoller has methods - getListViewOptions() and getFilterId() methods which are helpful. However, the maximum record limit for StandardSetController is 10,000 records. In my case there are records more than 10,000. How do I implement this so that I can handle records more than 10,000?
I am trying to demonstrate batch apex in Eclipse Neon with Force.com IDE. Following is the code -

global class BatchApexDemoClass1 implements Database.Batchable<Sobject> {
 global Database.QueryLocator start(Database.BatchableContext bc) {
    return Database.getQueryLocator([Select LeadSource From Lead]);
 }

 global void execute(Database.BatchableContext bc, List<Lead> scope) {
    for (Lead Leads : scope) {
        Leads.LeadSource = 'Dreamforce';
    }
    update scope;
 }    

 global void finish(Database.BatchableContext bc) { 
    System.debug('Batch apex execution complete.');
 }    
}

However, when I save the code, I get the following errors-
- Save error: Class BatchApexDemoClass1 must implement the method: void Database.Batchable.finish(Database.BatchableContext)
- Save error: Class BatchApexDemoClass1 must implement the method: void Database.Batchable.execute(Database.BatchableContext, List)
- Offline Mode. File only saved locally, not to server
- Save error: Class BatchApexDemoClass1 must implement the method: System.Iterable Database.Batchable.start(Database.BatchableContext)

I don't know what am I missing in the code.