• College Management
  • NEWBIE
  • 20 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 24
    Replies
Is there any possibility to change or set domain for cookies in browsers ?

User-added image

Help me out

Thanks !
Hi, I would like to retrieve dependant states whenever i select country from picklist both in Visualforce/Controller using Script/apex resp.
Any API ? whenever i send request with "countrycode/integrationvalue" so that i can able to get dependant "statecodes/integrationvalue".

Thanks !
Using Salesforce Analytics API i am not getting details of chart type which has been added to the report.

Thank you.
I've gone through Salesforce Analytics Rest Api (http://www.salesforce.com/us/developer/docs/api_analytics/salesforce_analytics_rest_api.pdf)and implemented an apex class which will make rest call
services/data/v32.0/analytics/reports/<reportId>?includeDetails=true and get report data of a given report id, It is retrieving all the records containing in the report but my requirement is to retrieve the report data which is visible to a particular user.
Please help me out.

Thanks !
Hi , I got a situation where i need to invoke future method from batch class. And i know that it is not possible to do. But there might be some workarounds to achieve it, right? And i dont want to invoke future method using shedule apex as my requirement will hit governor limits of "Total number of schedule jobs exceed". So i tried in below ways, but still fighting with same issue.

My design is
Scenario 1 :
1. Schedule Apex ===> 2. BatchClass (Runs every hour) (Generates a map with "N" records for every batch context, and passes it to Future method in an apex class)  ===> 3. Future method ( then it will login to a salesforce account and generates an attachment and sends an email to a corresponding email address) .

Scenario 2 :

Since, It is not possible to invoke future method from batch, i tried implementing an apex class with a normal static method  invoking future method and in a batch class, for every context i.e., execute() method, it will invoke a normal method which in turn invokes future method, but still got the same error ( FATAL ERROR: Future method cant be called from future or Batch).
ie., 
global class BatchClass implements Database.batachable<Sobject> {
   global Iterable<ScheduledReport__c> start(Database.BatchableContext BC) {
    query=[];
    return query;
    }
     global void execute(Database.BatchableContext BC, List<ScheduledReport__c> scope) {
         FutureClass.normalMethod(mapRecords);
      }
      global void finish(Database.BatchableContext BC){
      }
}

Future Class: 

global class FutureClass {
    global static void normalMethod(Map<> mapR) {
        futureMethod(mapR);
    }
    @future(callout=true)
    global static void futureMethod(Map<> m) {
        //some code;
     }
}

Scenario 3 :

Instead of invoking future class method from batch i tried updating list of records and done checkbox value to true and i've implemented after update event trigger to get the all the records in which checkbox values are true and from trigger i tried invoking future method , still didnt work , i got an error (  FATAL ERROR: Future method cant be called from future or Batch). 

Please help me out. 

Thanks !
Hi , Is there any workaround to overcome the above governor limit without aborting the job.
Hi, Please see the below cron expression, As it is not possible to pass value for both day of month and day of week i got stuck. My requirement is to run cron for weekdays starting from given day of month to endDate.

CRON = '' + startDate.second() + ' ' + startDate.minute() + ' ' + startDate.hour() + ' ' + startDate.day()+'/'+7 + ' ' + startDate.month() +'-'+endDate.month() + ' ? ' + ' ' + startDate.year()+'-'+endDate.year();

In the above underlined part (ie., Day of month ) i want to run cron on weekdays (i.e., From MON-WED) starting from given day of month.
The below cron works fine but it is starting from next available weekday. But i want to run the job for every weekdays starting from given day of month.
CRON = '' + startDate.second() + ' ' + startDate.minute() + ' ' + startDate.hour() + ' ' + '?' + ' ' + startDate.month() +'-'+endDate.month() + ' MON-FRI ' + ' ' + startDate.year()+'-'+endDate.year();

How can i achieve the below cron ??

CRON = '' + startDate.second() + ' ' + startDate.minute() + ' ' + startDate.hour() + ' ' + startDate.day() + ' ' + startDate.month() +'-'+endDate.month() + ' MON-FRI ' + ' ' + startDate.year()+'-'+endDate.year();

Please please help me out .. Its very urgent. Please.

Thanks !
Hi,
1. I've created an apex class and visualforce page to send given report to given email id as a pdf and xls attacments, working fine.
2. And i know " getContent() and getContentAsPdf() " is not supported for schedulable class. So to overcome it i created  schedule class which will call the previously created apex class to send a report. I am getting 2 attachments but it does not contains any content in it.


Thanks !
Hi, I am trying to integrate salesforce to quickbook , while executing the class i am getting STATUS : OK STATUS_CODE : 200 , Expected JSON response but i am getting html as a response.

        HttpRequest req = new HttpRequest();
        req.setMethod('POST');
        req.setEndpoint(loginUri);
        req.setBody("Here i am passing some arguments");
        req.setHeader('Accept', 'application/json;charset=UTF-8');
        Http http = new Http();
        HTTPResponse res = http.send(req);
        System.debug('RESPONSEEEEEEEEEEEEEEEEEEe'+res.getBody());

Thanks !
Hi, I am trying to integrate salesforce to quickbook , while executing the class i am getting STATUS : OK STATUS_CODE : 200 , Expected JSON response but i am getting html as a response.

        HttpRequest req = new HttpRequest();
        req.setMethod('POST');
        req.setEndpoint(loginUri);
        req.setBody("Here i am passing some arguments");
        req.setHeader('Accept', 'application/json;charset=UTF-8');
        Http http = new Http();
        HTTPResponse res = http.send(req);
        System.debug('RESPONSEEEEEEEEEEEEEEEEEEe'+res.getBody());

Thanks !
Hi, I've created a visualforce area Home page component with a commandlink in it and added it to Home page layout. I want to get the value of editpage onclicking the link which is present in component.


Thanks !
I've created 2 date fields (Start_Date__c & End_Date__c) and i've implemented an apex class that checks whether Start_Date__c > End_Date__c  or not if it is greater than end_Date__c then it will display an error message( i used addError(); method to display error message due to requirement of field level error message) but while getting the error message the field is going little up. I want to adjust it, Please help me out.

Thanks !
I've written a wrapperClass to display few questions in VFPage and i added an Answer field as selectList by giving few options to it through apex class. But while submitting , i am getting the last given option for every answer.Please help me out!

Thanks,!
Is there any possibility to change or set domain for cookies in browsers ?

User-added image

Help me out

Thanks !
Hi, I would like to retrieve dependant states whenever i select country from picklist both in Visualforce/Controller using Script/apex resp.
Any API ? whenever i send request with "countrycode/integrationvalue" so that i can able to get dependant "statecodes/integrationvalue".

Thanks !
I've gone through Salesforce Analytics Rest Api (http://www.salesforce.com/us/developer/docs/api_analytics/salesforce_analytics_rest_api.pdf)and implemented an apex class which will make rest call
services/data/v32.0/analytics/reports/<reportId>?includeDetails=true and get report data of a given report id, It is retrieving all the records containing in the report but my requirement is to retrieve the report data which is visible to a particular user.
Please help me out.

Thanks !
Hi , I got a situation where i need to invoke future method from batch class. And i know that it is not possible to do. But there might be some workarounds to achieve it, right? And i dont want to invoke future method using shedule apex as my requirement will hit governor limits of "Total number of schedule jobs exceed". So i tried in below ways, but still fighting with same issue.

My design is
Scenario 1 :
1. Schedule Apex ===> 2. BatchClass (Runs every hour) (Generates a map with "N" records for every batch context, and passes it to Future method in an apex class)  ===> 3. Future method ( then it will login to a salesforce account and generates an attachment and sends an email to a corresponding email address) .

Scenario 2 :

Since, It is not possible to invoke future method from batch, i tried implementing an apex class with a normal static method  invoking future method and in a batch class, for every context i.e., execute() method, it will invoke a normal method which in turn invokes future method, but still got the same error ( FATAL ERROR: Future method cant be called from future or Batch).
ie., 
global class BatchClass implements Database.batachable<Sobject> {
   global Iterable<ScheduledReport__c> start(Database.BatchableContext BC) {
    query=[];
    return query;
    }
     global void execute(Database.BatchableContext BC, List<ScheduledReport__c> scope) {
         FutureClass.normalMethod(mapRecords);
      }
      global void finish(Database.BatchableContext BC){
      }
}

Future Class: 

global class FutureClass {
    global static void normalMethod(Map<> mapR) {
        futureMethod(mapR);
    }
    @future(callout=true)
    global static void futureMethod(Map<> m) {
        //some code;
     }
}

Scenario 3 :

Instead of invoking future class method from batch i tried updating list of records and done checkbox value to true and i've implemented after update event trigger to get the all the records in which checkbox values are true and from trigger i tried invoking future method , still didnt work , i got an error (  FATAL ERROR: Future method cant be called from future or Batch). 

Please help me out. 

Thanks !
Hi , Is there any workaround to overcome the above governor limit without aborting the job.
Hi,
1. I've created an apex class and visualforce page to send given report to given email id as a pdf and xls attacments, working fine.
2. And i know " getContent() and getContentAsPdf() " is not supported for schedulable class. So to overcome it i created  schedule class which will call the previously created apex class to send a report. I am getting 2 attachments but it does not contains any content in it.


Thanks !
Hi, I am trying to integrate salesforce to quickbook , while executing the class i am getting STATUS : OK STATUS_CODE : 200 , Expected JSON response but i am getting html as a response.

        HttpRequest req = new HttpRequest();
        req.setMethod('POST');
        req.setEndpoint(loginUri);
        req.setBody("Here i am passing some arguments");
        req.setHeader('Accept', 'application/json;charset=UTF-8');
        Http http = new Http();
        HTTPResponse res = http.send(req);
        System.debug('RESPONSEEEEEEEEEEEEEEEEEEe'+res.getBody());

Thanks !
Hi, I've created a visualforce area Home page component with a commandlink in it and added it to Home page layout. I want to get the value of editpage onclicking the link which is present in component.


Thanks !
we want to query on lead in batch class according to a particuler user sharing setting but as the the batch class run on system context it brings records globally, we want to query on lead in batch class based on the user who submitted the job and for a user who does not have all permisions on lead,lead is private for him.