• Raumil
  • NEWBIE
  • 50 Points
  • Member since 2011

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

Hi All,

           i want to add formula field to retrive recordtype.But i want that it should be present on pagelayout

           but should also be invisible.It is possible or not.

 

           With Regards

           Prabhash Mishra

        

Hello Friends,

 

I want to know in which object should i query for obtaining all information about Time Dependent workflows in organization. Any help would be appreciated.

 

Thank You

Raumil Setalwad

Hello friends,

 

Is it possible to call Batch class form another batch class? If possible then how.? and if not possible then pleaes explain it with proper reason

 

Thank You

Raumil Setalwad

Hello friends,

 

I want to know how many workflows can be created in an Enterprise addition. Please provide me link to any documentation. Any help would be appreciated.

 

Thank You.

Raumil Setalwad

Hello friend i am writing test class for following class but i am not able to know where to start from so please help me my Class is below.

public with sharing class ExternalPDFGetway{

    
    public static Blob getInvoicePdf( String tempkey ) {
        if(tempkey != null ){
           //Map < String ,Transaction__c > trxmap = new Map < String , Transaction__c>();
            
            akritiv__Temp_Object_Holder__c objtemp = [select ID,akritiv__Key__c,akritiv__value__c from akritiv__Temp_Object_Holder__c where akritiv__Key__c =: tempkey ];
            System.debug('--------------->> TOH :: '+ objtemp );
            
            string trxList = objtemp.akritiv__value__c;
            System.debug('--------------->> trxlist :: '+ trxList);
            List<ID> txids = new List<ID>();
            for(String onetrx : trxList.split(',')) {
                System.debug('--------------->> one-trx :: '+ onetrx );
                if(onetrx !='') {
                    txids.add(onetrx);
                }
            }
            
            
            List<akritiv__Transaction__c> objTrxlist = [select id,Name, akritiv__Transaction_key__c from akritiv__Transaction__c where Id in :txids   ];
            System.debug('--------------->> get invoice pdf :: '+ objTrxlist.size());
        
            if(objTrxlist.size() == 1){
                return getInvoice(objTrxlist.get(0).Name);
            }else if(objTrxlist.size() > 1){
                System.debug('----- More then one Transactions ------');
                String txnumbers = '';
                for(akritiv__Transaction__c objtx : objTrxlist ){
                    txnumbers = txnumbers + ',' + objtx.name ;
                }
                System.debug('----- trx numbers :: '+txnumbers );
                return getMultipleInvoice(txnumbers);

            }else{
                System.debug('----- No Transactions ------');
            }
        }
        return null;    
    }
    public static Blob getInvoice( String invoicenumber ){
    
        String url = ExternalPDFGetway.getExternalPDFUrl();
        url  = url  + '?invoice='+invoicenumber;
        System.debug('------->>> Url :: '+url);
        Http h = new Http();

        HttpRequest req = new HttpRequest();
        req.setEndpoint(url);
        req.setMethod('GET');

        HttpResponse res = h.send(req);

        return EncodingUtil.base64Decode(res.getBody());
    
    }
    
    
    public static Blob getMultipleInvoice( String  invoicenumbers ){
    
        String url = ExternalPDFGetway.getExternalPDFUrl();
        url  = url  + '?invoices='+invoicenumbers ;
        
        Http h = new Http();

        HttpRequest req = new HttpRequest();
        req.setEndpoint(url);
        req.setMethod('GET');

        HttpResponse res = h.send(req);

        return EncodingUtil.base64Decode(res.getBody());      
    
    }
    
    
    public static Blob getAllOpenInvoice( String accountNumber ) {
    
        
        String url = ExternalPDFGetway.getExternalPDFUrl();
        url  = url  + '?account='+accountNumber ;
        
        Http h = new Http();

        HttpRequest req = new HttpRequest();
        req.setEndpoint(url);
        req.setMethod('GET');

        HttpResponse res = h.send(req);

        return EncodingUtil.base64Decode(res.getBody());
    }
    
    
    // * -------------- PDF Endpoint -------------
    
    // Returns default  value of PDF PDF_Endpoint__c Setting 
    // Return Type PDF_Endpoint__c
    // No parameters are passed in this method 
    public static PDF_Endpoint__c getPDFEndpointConfigurationObj() {

        return PDF_Endpoint__c.getOrgDefaults();
    }
    
    // Returns External PDF URL specified in  PDF_Endpoint__c Custom Setting 
    // Return Type PDF_Endpoint__c
    // No parameters are passed in this method 
    public static String getexternalPDFUrl() {
        return getPDFEndpointConfigurationObj().External_PDF_URL__c;
    }
           
    // Fetches the value of Use External PDF which is specified in PDF_Endpoint__c Custom Setting 
    // Return Type - Boolean 
    // No Parameters are passed in this method  
    public static boolean isEnableUseExternalPDF() {
        PDF_Endpoint__c pdfConfObj = ExternalPDFGetway.getPDFEndpointConfigurationObj();
        boolean isExternalPDFOptionEnabled = false;
        if(pdfConfObj !=null) {
            if(pdfConfObj.Use_External_PDF__c !=null) {
                isExternalPDFOptionEnabled = pdfConfObj.Use_External_PDF__c;
            }
        }
        return isExternalPDFOptionEnabled;
    }
    
    
    
    
    // * -------------- PDF Endpoint -------------
    
    
}

 

 

Any Help would be appreciated.

Regards

Raumil Setalwad

One record TEST is created by User U2 (profile - Demo) in the standard object Account and user U1 (profile - admin) is trying to create a record in Contact object and after clicking on the lookup field Account Name it doesn’t displays the record TEST created by User U2. Guide me where I am going wrong.



Thanks

Rock

plz help me how to cover the else condition in salesforce

Hi Experts,

 

How to install salesforce.com in mobile devices like iphone as well as ipad2..Please tell me the steps...

 

Revert to this at the earliuest

 

Thanks and Regards

 

Sanju

Hello Friends,

 

I want to know in which object should i query for obtaining all information about Time Dependent workflows in organization. Any help would be appreciated.

 

Thank You

Raumil Setalwad

My apologies if this is the wrong forum for this question.

 

I'm working with a non-profit that has recently acquired Salesforce and wants to migrate all of its existing data and reorts to Salesforce from an Access database.

 

Can someone point me toward the documentation and tools for this?

 

Thaks in Advance!

Sean

Hello All,

I 'd an issue regarding sending emails using singleemailmessage class. Heard that we can send 10 * 1000 = 10000 emails per execution (10 arrays, each array to accomodate 1000 emails). Is this true?

But i am unable to send more than 10 emails. Could anyone plz clarify me how to do. PFB my code snippet:

 

            }

for(Permit__c p:permitList){
                 Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); 
                                    String subject = p.Name+' | '+p.Region__c+' | '+p.Full_State__c+' | '+p.Channel__c+' | Status=Expired';
                                    email.setSubject(subject);
                                    String emailadd = 'abc@xyz.com';
                                    String[] toAddresses = emailadd.split(',');
                                    email.setToAddresses(toAddresses);
                                    email.setHTMLBody( 'email body.' );
                 Messaging.SendEmailResult[] r = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email}); 

 

 

An error is being thrown when 10 mails are sent and is about to send 11th email.

Plz help!

Hi All,

           i want to add formula field to retrive recordtype.But i want that it should be present on pagelayout

           but should also be invisible.It is possible or not.

 

           With Regards

           Prabhash Mishra

        

when I have given a mail with the valid format... but the mail actually doesn't exists.. It is not showing any error . I just want to handle such situation .Can anyone help.

  • July 19, 2011
  • Like
  • 0

i have created a monthly_asset__c as formula field 

 

how can i use picklist values in my formula field

 

my task is that when the value is selected from the picklist i have the condition some  percent is to be assinged  to that picklist 

Hi all,

 

What are the limitations for using cookies in SFDC? pls explain the disadvantages also.

 

Please advice.

 

 

Thanks in advance.

  • July 19, 2011
  • Like
  • 0

public Double goalYearValue {get;set;}

 

Whenever I write the above line that what it means & from where it access the value ?

Initially it call set property or get property ?

If I write this line then how I can pass my values in this ?

How to connect my page & controller to bean so that my data will flow very well...

Please give me simple example about flow & execution.

 

Hello friends,

 

Is it possible to call Batch class form another batch class? If possible then how.? and if not possible then pleaes explain it with proper reason

 

Thank You

Raumil Setalwad

Hello friends,

 

I want to know how many workflows can be created in an Enterprise addition. Please provide me link to any documentation. Any help would be appreciated.

 

Thank You.

Raumil Setalwad

when i execute my class in production envt i am getting the following error

Invalid field Retirement_Age__c for SObject Account

  i have created the field named Retirement Age in my Account object. when i saved my class it did not give me any error msg that field does not exist.

please help with this 

I have the following Apex trigger on the Activites object:

 

trigger TaskAfter on Task ( after insert, after update) {

Set<Id> leadsToUpdate = new Set<Id>{};
String leadPrefix = Lead.SObjectType.getDescribe().getKeyPrefix();

for(Task t : trigger.new)
if(t.WhoId != null && ((String)t.WhoId).startsWith(leadPrefix))  //if not null and whoId belongs to a Lead
leadsToUpdate.add(t.WhoId);
List<Lead> updateLeads = new List<Lead>{};

for (Lead currLead : [Select Id, Phone_Call_Attempts__c, Successful_Phone_Calls__c,  Future_Dated_Task_Scheduled__c, Overdue_Task_Flag__c, (Select Id, Status, ActivityDate, Outcome__c from Tasks ORDER BY CreatedDate DESC) from Lead where Id IN :leadsToUpdate ])
{
updateLeads.add(currLead);
currLead.Phone_Call_Attempts__c = 0;
currLead.Successful_Phone_Calls__c = 0;
currLead.Future_Dated_Task_Scheduled__c = false;
currLead.Overdue_Task_Flag__c = false;

for(Task t : currLead.Tasks )
{

if(t.Status == 'Completed')
{
currLead.Phone_Call_Attempts__c += 1;

if(t.Outcome__c == 'Call Successful - Spoke with contact')
currLead.Successful_Phone_Calls__c += 1;
}//end if

else if(t.ActivityDate > Date.Today() && t.Status == 'Not Started')
currLead.Future_Dated_Task_Scheduled__c = true;

else if (t.ActivityDate <= Date.Today() && t.Status == 'Not Started')
currLead.Overdue_Task_Flag__c = true;

}//end inner for
}//end outer for

if (updateLeads != null && !updateLeads.isEmpty())
Database.update(updateLeads);

}

 

However this only runs after insert and after update (as stipulated) I need this to run automaticallyy, a number of times per day, say 09:00 12:00 15:00 and 17:00 I understand this can be done through a batch apex, however do not have a clue how to do. 

 

Any assistance would be most apprecaited.

 

Steve

Another class deployed fails the coverage test while I want to update my class from IDE.

The problem is the system doesn't allow the update of my class.

Is it a normal system behavior?

 

related error:

http://boards.developerforce.com/t5/Apex-Code-Development/limit-of-10000-query-rows-in-APEX-class/td-p/278947