• AB003
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 8
    Replies

Hi all, is there any way to send documents from salesforce to some FTP folder?

 

Actually there are 2 requirements. First, a report should be automatically converted into csv at the end of the month and Second, this csv file should be send to ftp folder or any other local folder?

 

Please advise how I can achieve this?

 

Thanks
Abhi

  • July 15, 2013
  • Like
  • 0

Hi Can you help with the trigger.

 

I want to update the status field on parent case when child case status is updated? Is it possible. Can you send me the sample for that?

 

I have seen sample trigger the other way round for updating child case when parent case is updated.

 

http://wiki.developerforce.com/page/Synchronize_A_Parent_Case's_Status_To_The_Status_Of_Its_Children

 

Any help with be appreciated.

 

Thanks

Abi

  • March 28, 2013
  • Like
  • 0

Hi, I need help to create a clone functionalities on account. Bascially the clone should clone some field. Can we do it with Onclick Javascript? My Visualforce skills in not good. Or if you give me a starting point, I will try to create a clone button. THere are many blogs on this but I didn't find a simple one.

 

Any help will be really appreciated.

 

Thanks

AB.

  • March 21, 2013
  • Like
  • 0

Hi All,

 

My knowledge is limited for integration. I was hoping to get some answer. We have some home built billing system. We want to integrate this with SF in future. What are my options? Please answer. Not to mention there are very good integrator like Informatica, Cast-Iron but these are very costly tools. Also are there any option for exporting data from SF to billing system one way.

 

PLease advise

 

Thanks

Abhi 

  • March 15, 2013
  • Like
  • 0

Hi All,

 

Is there a way of highlighting a field depending on amount value. I have a field revenue. I want to highlight it with color. Suppose if user insert value as 50, anything between 1 - 60 will be in blue and so on. I am not sure if it can be done?

 

Please advise.

 

Thanks

Abhishek

  • March 14, 2013
  • Like
  • 0

Hi All,

 

I am not able to figure out the solutions for this. I have case created. The case status changes to open and the user replies using email message to the customer and with my work flow the status changes to waiting for client reply. Again if the client replies to the message, the status changes to open. Working well.

 

Now, I need if the status is "waiting for client" and then we didn't hear see any client email for 3 days, case must be closed automatically and email is send to client. I m not able to figure out how to achieve it. I can't create a time based trigger since the trigger evalutes criteria when record it edited and trigger after 3 days if the criteria still holds true. Since there can be a possiblity that the status is changed from waiting to open and again to waiting within 3 days and the trigger will fires on 3 day which shouldn't.

 

THanks

A

  • March 07, 2013
  • Like
  • 0

Hi All,

 

I need help. The web to lead is not generating lead in production. I checked the the web page. THe html code include both these importants tag lines which points to our SF production but then also no lead created. What is the reason? Please help

 

<form action="https://cs17.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

<input type=hidden name="oid" value="00Dg000000055Uf">

 

Thanks

A

  • March 06, 2013
  • Like
  • 0

Hi My user is having a problem in synch the event and task and throwing up an error "You have one or more outlook sync folders missing".

 

I am trying the solution posted on SF article. But the problem the solution is for outllook 03, 07 not for 2010 as I cannot see any tool option on outlook 2010 to check the the synching.

 

Link: (http://help.salesforce.com/apex/HTViewSolution?id=000170939&language=en_US).

 

Please any help will be appreciated.

 

Thanks

Abhishek

  • March 01, 2013
  • Like
  • 0

Hi All,

 

I want to write a some kind of workflow (may be a trigger) for future run. Whenver lead is created and if it is not followed up for first 24 hours of creation(not modified for first 24 hours), a email alert is send to certain users that lead is not followed up with a template.

 

Condition:

 

When lead age is more than 24 hours and less than 36 hours and the lead owner is not changed from queue to user a email needs to fire.

 

Can anyone help me in this.

 

Thanks

Abhishek

  • February 28, 2013
  • Like
  • 0

Hi All,

 

I want to write a trigger for future run. Whenver lead is created and if it is not followed up for 24 hours, a triggers should fire sending an email to certain users that lead is not followed up with a template.

 

Condition:

 

when lead owner is not changed from the queue to a user when lead age is more than 24 hours and less than 36 hours,a email needs to fire.

 

Can anyone have any kind of sample code? This trigger will fire in future.

 

Thanks

Abhishek

  • February 26, 2013
  • Like
  • 0

Hi All,

 

I have a Apex Class. THis is used in creating new cases. THe problem is if I create a validation rules it throw an error  when new cases is created. I am not sure why this is happening as I didn't write this code. Any help is appreciated.

 

Error: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Please select Type and Category:

Error is in expression '{!insertAndRedirect}' in component <apex:page> in page cases_new

 

An unexpected error has occurred. Your development organization has been notified

 

Code:

public with sharing class cases_Extension {

    public case thisCase {get;set;}
    public List<Case> theseCases {get;set;}
    
    public cases_Extension(ApexPages.StandardController controller){
        this.thisCase = (Case) controller.getRecord();
        this.theseCases = new List<Case>();
    }
    
    public cases_Extension(ApexPages.StandardSetController controller){
        this.theseCases = (List<Case>) controller.getRecords();
    }


    public PageReference insertAndRedirect(){
        //If DID__c is populated, Query DIDs
        if ( thisCase.Did__c != null && (thisCase.AccountId == null || thisCase.ContactId == null )){
            List<DID__c> didQuery = [Select Id, Account__c, Contact__c from DID__c where Id = :thisCase.Did__c limit 1];
            if ( didQuery.size() > 0 ){
                DID__c thisDid = didQuery[0];
                if ( thisCase.AccountId == null && thisDID.Account__c != null ){
                    thisCase.AccountId = thisDID.Account__c;
                } 
                if ( thisCase.ContactId == null && thisDID.Contact__c != null ){
                    thisCase.ContactId = thisDID.Contact__c;
                } 
            } 
        }


        insert thisCase;
        String url = '/'+thisCase.id+'/e?retURL=' + EncodingUtil.urlEncode('/500/o','UTF-8');
        PageReference p = new PageReference(url);
        return p;
    }

    public PageReference getNextCase(){
        //Determine current user
        Id userId = userinfo.getUserId();
        Set<Id> listQueueIds = new Set<id>();
        Set<Id> myQueueIds = new Set<id>();
        List<Case> caseQuery = new List<Case>();
        
        if ( theseCases.size() > 0 ){
            for ( Case c : theseCases ){
                if ( string.valueOf(theseCases[0].OwnerId).subString(0,3) != '005' ){
                    myQueueIds.add( theseCases[0].OwnerId );
                }
            }
            if ( myQueueIds.size() > 0 ){
                caseQuery = [Select Id, CreatedDate, IsClosed from Case where OwnerId in :myqueueIds and IsClosed != TRUE order by CreatedDate asc limit 1];
            }
        }

        if ( caseQuery.size() == 0){
            for ( GroupMember gm : [Select UserOrGroupId, Group.Type, Group.RelatedId, Group.Name, GroupId From GroupMember where Group.Type = 'Queue' and UserOrGroupId = :userId]){
                listQueueIds.add(gm.GroupId);
            }
            caseQuery = [Select Id, CreatedDate, IsClosed from Case where OwnerId in :listQueueIds and IsClosed != TRUE order by CreatedDate asc limit 1];
        }

        if ( caseQuery.size() > 0 ){
            thisCase = caseQuery[0];
            thisCase.OwnerId = userId;
            update thisCase;
            PageReference p = new PageReference('/'+thisCase.id);
            return p;
        } else {
            PageReference p = new PageReference('/500/o');
            return p;
        }
    }

    public PageReference replyToCase(){
        if ( string.valueOf(thisCase.OwnerId).subString(0,3) != '005' ){
            thisCase.OwnerId = userInfo.getUserId();
            update thisCase;
        }
        String templateId = '00X60000000xlFf';  //Sandbox
//      String templateId = '00XR0000000MJWr';  //Production
        
        PageReference p = new PageReference('/_ui/core/email/author/EmailAuthor?p2_lkid='+ thisCase.ContactId + '&p3_lkid=' +  thisCase.Id + '&rtype=003&template_id=' + templateId + '&p26=' + thisCase.From__c + '&retURL=%2F' + thisCase.Id);
        p.setRedirect(true);
        return p;
    }

}

  • February 24, 2013
  • Like
  • 0

Hi All,

 

I have a requirement. I need to pull the lead source of the opportunity from lead object and show that on opportunity page. How can achieve it. I tried using formula field, lead object doesn't show in the formula. Nor I can use a workflow.
Do you have any solution?

 

Thanks

Abhi

  • February 21, 2013
  • Like
  • 0

Hi All,.

 

I need to pull out of list of record type for each and every profile checking which record type is default and what are the record type is available for that profile on account, case and contact.

 

Thanks

AB

  • January 02, 2013
  • Like
  • 0

Hi, I need help to create a clone functionalities on account. Bascially the clone should clone some field. Can we do it with Onclick Javascript? My Visualforce skills in not good. Or if you give me a starting point, I will try to create a clone button. THere are many blogs on this but I didn't find a simple one.

 

Any help will be really appreciated.

 

Thanks

AB.

  • March 21, 2013
  • Like
  • 0

Hi All,

 

My knowledge is limited for integration. I was hoping to get some answer. We have some home built billing system. We want to integrate this with SF in future. What are my options? Please answer. Not to mention there are very good integrator like Informatica, Cast-Iron but these are very costly tools. Also are there any option for exporting data from SF to billing system one way.

 

PLease advise

 

Thanks

Abhi 

  • March 15, 2013
  • Like
  • 0

Hi All,

 

Is there a way of highlighting a field depending on amount value. I have a field revenue. I want to highlight it with color. Suppose if user insert value as 50, anything between 1 - 60 will be in blue and so on. I am not sure if it can be done?

 

Please advise.

 

Thanks

Abhishek

  • March 14, 2013
  • Like
  • 0

Hi All,

 

I need help. The web to lead is not generating lead in production. I checked the the web page. THe html code include both these importants tag lines which points to our SF production but then also no lead created. What is the reason? Please help

 

<form action="https://cs17.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

<input type=hidden name="oid" value="00Dg000000055Uf">

 

Thanks

A

  • March 06, 2013
  • Like
  • 0

Hi All,

 

I want to write a some kind of workflow (may be a trigger) for future run. Whenver lead is created and if it is not followed up for first 24 hours of creation(not modified for first 24 hours), a email alert is send to certain users that lead is not followed up with a template.

 

Condition:

 

When lead age is more than 24 hours and less than 36 hours and the lead owner is not changed from queue to user a email needs to fire.

 

Can anyone help me in this.

 

Thanks

Abhishek

  • February 28, 2013
  • Like
  • 0

Hi All,

 

I have a Apex Class. THis is used in creating new cases. THe problem is if I create a validation rules it throw an error  when new cases is created. I am not sure why this is happening as I didn't write this code. Any help is appreciated.

 

Error: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Please select Type and Category:

Error is in expression '{!insertAndRedirect}' in component <apex:page> in page cases_new

 

An unexpected error has occurred. Your development organization has been notified

 

Code:

public with sharing class cases_Extension {

    public case thisCase {get;set;}
    public List<Case> theseCases {get;set;}
    
    public cases_Extension(ApexPages.StandardController controller){
        this.thisCase = (Case) controller.getRecord();
        this.theseCases = new List<Case>();
    }
    
    public cases_Extension(ApexPages.StandardSetController controller){
        this.theseCases = (List<Case>) controller.getRecords();
    }


    public PageReference insertAndRedirect(){
        //If DID__c is populated, Query DIDs
        if ( thisCase.Did__c != null && (thisCase.AccountId == null || thisCase.ContactId == null )){
            List<DID__c> didQuery = [Select Id, Account__c, Contact__c from DID__c where Id = :thisCase.Did__c limit 1];
            if ( didQuery.size() > 0 ){
                DID__c thisDid = didQuery[0];
                if ( thisCase.AccountId == null && thisDID.Account__c != null ){
                    thisCase.AccountId = thisDID.Account__c;
                } 
                if ( thisCase.ContactId == null && thisDID.Contact__c != null ){
                    thisCase.ContactId = thisDID.Contact__c;
                } 
            } 
        }


        insert thisCase;
        String url = '/'+thisCase.id+'/e?retURL=' + EncodingUtil.urlEncode('/500/o','UTF-8');
        PageReference p = new PageReference(url);
        return p;
    }

    public PageReference getNextCase(){
        //Determine current user
        Id userId = userinfo.getUserId();
        Set<Id> listQueueIds = new Set<id>();
        Set<Id> myQueueIds = new Set<id>();
        List<Case> caseQuery = new List<Case>();
        
        if ( theseCases.size() > 0 ){
            for ( Case c : theseCases ){
                if ( string.valueOf(theseCases[0].OwnerId).subString(0,3) != '005' ){
                    myQueueIds.add( theseCases[0].OwnerId );
                }
            }
            if ( myQueueIds.size() > 0 ){
                caseQuery = [Select Id, CreatedDate, IsClosed from Case where OwnerId in :myqueueIds and IsClosed != TRUE order by CreatedDate asc limit 1];
            }
        }

        if ( caseQuery.size() == 0){
            for ( GroupMember gm : [Select UserOrGroupId, Group.Type, Group.RelatedId, Group.Name, GroupId From GroupMember where Group.Type = 'Queue' and UserOrGroupId = :userId]){
                listQueueIds.add(gm.GroupId);
            }
            caseQuery = [Select Id, CreatedDate, IsClosed from Case where OwnerId in :listQueueIds and IsClosed != TRUE order by CreatedDate asc limit 1];
        }

        if ( caseQuery.size() > 0 ){
            thisCase = caseQuery[0];
            thisCase.OwnerId = userId;
            update thisCase;
            PageReference p = new PageReference('/'+thisCase.id);
            return p;
        } else {
            PageReference p = new PageReference('/500/o');
            return p;
        }
    }

    public PageReference replyToCase(){
        if ( string.valueOf(thisCase.OwnerId).subString(0,3) != '005' ){
            thisCase.OwnerId = userInfo.getUserId();
            update thisCase;
        }
        String templateId = '00X60000000xlFf';  //Sandbox
//      String templateId = '00XR0000000MJWr';  //Production
        
        PageReference p = new PageReference('/_ui/core/email/author/EmailAuthor?p2_lkid='+ thisCase.ContactId + '&p3_lkid=' +  thisCase.Id + '&rtype=003&template_id=' + templateId + '&p26=' + thisCase.From__c + '&retURL=%2F' + thisCase.Id);
        p.setRedirect(true);
        return p;
    }

}

  • February 24, 2013
  • Like
  • 0

Hi all,

 

I am trying to create a trigger on a related case that would update a field on the parent case when the new related (child) case is created against the parent. I am not an expert at apex triggers but have modified some code. I have copied it below.

 

Can anybody help me complete the code for this to work.

 

Thanks

 

 

 

trigger UpdateParentCase on Case (after insert, after update){
Case relcase = Trigger.new[0];
Case ca = new Case();
for(Case c:[Select Id,  Attempted_Call__c from Case where
Id = :relcase.Parent limit 1]){
ca = c;
ca.Attempted_Call__c = true;
update ca;
}
}