• Phry
  • NEWBIE
  • 25 Points
  • Member since 2012

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

Hello,

 

I am trying to fix an issue with a  trigger not working to update our account data on our salesforce org. We use the dataloader to upsert a .csv that is output from our local database to the cloud each night, which then using a trigger + apex class updates all the accounts on the cloud. However it has stopped updating the accounts. The data loader is still uploading the account data to the cloud. Looking over logs i found that the ID numbers have changed to a different format between the time the updates were working properly to now. When the updates were working properly the success log from the data loader had ID number such as the following 001C000000u35HpIAI, 001C000000u35HqIAI. The numbering for these same accounts now looks like a0LC000000WTDY8MAP, a0LC000000WTDY9MAP in the dataloader. I'm looking for a way to get the numbers back to what they were when the trigger was working. The .CSV file that has the customer data had no ID field. I'm not exactly sure where the ID numbers are being generated from or how to them to change, any help would be appreciated.  Mike

  • December 22, 2012
  • Like
  • 0

Hello,

 

I am trying to fix an issue with a  trigger not working to update our account data on our salesforce org. We use the dataloader to upsert a .csv that is output from our local database to the cloud each night, which then using a trigger + apex class updates all the accounts on the cloud. However it has stopped updating the accounts. The data loader is still uploading the account data to the cloud. Looking over logs i found that the ID numbers have changed to a different format between the time the updates were working properly to now. When the updates were working properly the success log from the data loader had ID number such as the following 001C000000u35HpIAI, 001C000000u35HqIAI. The numbering for these same accounts now looks like a0LC000000WTDY8MAP, a0LC000000WTDY9MAP in the dataloader. I'm looking for a way to get the numbers back to what they were when the trigger was working. The .CSV file that has the customer data had no ID field. I'm not exactly sure where the ID numbers are being generated from or how to them to change, any help would be appreciated.  Mike

 
  • December 21, 2012
  • Like
  • 0

Hello folks,

 

                        I've been working on fixing a trigger we have setup on our salesforce domain. This trigger was setup more then a year ago  by someone else and at that time was working. However for quite awhile now it just does not seem to be firing at all. What the trigger is suppose to do is add to and update our salesforce customer accounts database from nightly uploads with the dataloader from our in house database info. The Dataloader is functioning correctly, with .csv file contents is being uloaded to the salesforce org. I can see the updated customer info as Customer Imports Object on the cloud. However the trigger is then supposed to take this info and update the actual Salesforce Account objects, which it is not. I've listed the Trigger and dependent class that maps all the data from the customer imports data to the accounts on the cloud, as well as the Account_import_c object description info. I have attempted to run logs on this trigger and it does not appear to be firing at all. Both trigger and class are valid and active. I have run tests on these and code coverage is 100% on the trigger and 98% on the class. Unfortunately i cannot contact the original author of all of this, i've been tasked with trying to get our salesforce accounts to be updated each morning again when the dataloader performs the upload to salesforce. Any help or insight as to what might be wrong with these would be greatly appreciated.  Thanks Mike

 

 

Here is the tigger accountImportAfterInsertUpdate.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// ==================================================================================
//   Object: accountImportAfterInsertUpdate 
//
//  
// Comments: Automatically create Statement and Service Accounts, plus Contacts,
//           whenever a new Account Import record is inserted or upserted.
// ==================================================================================
//  Changes: 2011-07-05 Initial version.
// ==================================================================================

trigger accountImportAfterInsertUpdate on Account_Import__c (after insert, after update)
{
    // These records are coming from CommSoft. There is a single record in the CSV
    // file, from which we derive up to three separate records. We want to ensure
    // that no duplicate records are created but updates to existing records are
    // preserved. We also want to capture any import errors and store them on the
    // import record. This is why we are calling an @future class to do the actual
    // work, because we cannot directly update the record in an after trigger. 
    Set<Id> ids = system.trigger.newMap.keySet();
    importAccount.doImport(ids);
}

 

  
  • November 26, 2012
  • Like
  • 0

Hello,

 

                I'm looking for a little help with a validation rule. So far i have the following rule.

 

ISPICKVAL( Resolution_Type__c ,"Trouble")
&&
NOT(ISPICKVAL(Status ,"Working")
)

 

Which when Trouble is chosen from picklist then the case status has to be set to working in order to save. This is working great.

 

Now i'm looking to make this rule apply only for three individual users. I know i can use $User.Id <> "###" to specify some users but i'm just not sure on the syntax to make it work with the rest of the rule and make the rule only trigger for these specific users.  Any help would be greatly appreciated.  Thanks Mike

  • September 20, 2012
  • Like
  • 0

Hello, I'm trying to determine if a Workflow rule can be setup along with a field update to auto fill a simple text template into the Internal Comments text field when a user opens a new Case. For example some generic text such as First Name:, Last Name, Phone Number, etc to go into every new case Internal Comments field. This will be used as a template by the user to fill the proper info into this field.  If this is possible to do with a Workflow for the Internal Comments field I would be most appreciative for any info on how write the formula to do so. I'm new to working with Workflow Rules.   Thanks Mike

 

Here's an example of the formatting for the text template needed to be in the Internal comments field;

Name:

Address:

Primary Contact#:

Secondary Contact#:

Availability:

 

 

  • June 29, 2012
  • Like
  • 0

I'm having an issue with a VF redirect being used for new case button. It is now over riding some of the actions on a create case custom button. The create case button is used when a customer is found in the salesforce database. Create case would normally auto fill a number of fields on a case such as customer's first/last name, phone#, etc from the account in salesforce. I also have a New case button to be used when a customer is not found in the database. This New case button is linked to a VF page that redirects the user to a blank case with the exception of the internal comments filled in with a template that the user uses to get info for the case. Currently since the VF redirect page was activated for the New case button, the Create case button is also being redirected to the NEW case layout and not auto filling info from the customer account in sales force like it was previous when the NEW case button was not using the redirect. I can set the New case button back to the default and the creat case again works liek it should filling info in the fields from the case. I can also see with the URL that when Create case button is clicked it is using the redirect setup for the NEw case button with VF page and pex class listed below. I would like to have the create case button still pull the info from the customers account and auto fill a created case as well as having the NEW case button function to auto fill it's internal comments field. Any help that can be provided would be great appreciated. Below is the code for the custom create case button url and the VF page plus apex code for the redirect to be used with the New case button.  Thanks for any help with this issue.

 

Create case custom button-

https://na8.salesforce.com/setup/ui/recordtypeselect.jsp?ent=Case&retURL=%2F500%2Fo&save_new_url=%2F500%2Fe%3FretURL%3D%252F500%252Fo&00NC00000059fMt={!Account.First_Name__c}&00NC00000059fMy={!Account.Last_Name__c}&00NC00000059fMG={!Account.Email__c}&cas4={!Account.Name}&cas16=Name:%0AAddress:%0APrimary Contact:%0ASecondary Contact:%0ADSL
Username:%0ADSL Password:%0ADSL Phone Number:%0ACABLE Modem MAC:%0AEMTA
MAC:%0AShentel Phone Number:%0ASTB Serial number:%0AAvailability:%0AContact Customer
Prior to Visit:%0ATicket Notes:%0AAware of Charges:%0ADirections:


 

New Button Redirect VF page-

<apex:page standardController="Case" extensions="newbuttonredirect" action="{!pageredir}">

</apex:page>

 

New Button Redirect Apex class -

public class newbuttonredirect
{

public newbuttonredirect(ApexPages.StandardController controller)
{

}
public Pagereference pageredir()
{
    Pagereference newpage = new Pagereference ('/500/e?nooverride=1&cas16=Name:%0AAddress:%0APrimary Contact:%0ASecondary Contact:%0ADSLUsername:%0ADSL Password:%0ADSL Phone Number:%0ACABLE Modem MAC:%0AEMTA MAC:%0AShentel Phone Number:%0ASTB Serial number:%0AAvailability:%0AContact Customer Prior to Visit:%0ATicket Notes:%0AAware of Charges:%0ADirections:&retURL=/500/o');
    return newpage;
}
}

  • June 28, 2012
  • Like
  • 0

I'm having an issue with a VF redirect being used for new case button but it is now over riding some of the actions on a create case custom button. The create case button is used when a customer is found in the salesforce database. Create case would normally auto fill a number of fields on a case such as customer's first/last name, phone#, etc from the account in salesforce. I also have a New case button to be used when a customer is not found in the database. This New case button is linked to a VF page that redirects the user to a blank case with the exception of the internal comments filled in with a template that the user uses to get info for the case. Currently since the VF redirect page was activated for the New case button the Create case button is also being redirected to the NEW case layout and not auto filling info from the customer account in sales force like it was previous when the NEW case button was not using the redirect. I would like to have the create case button still pull the info from the customers account and auto fill a created case as well as having the NEW case button function to auto fill it's internal comments field. Any help that can be provided would be great appreciated. Below is the code for the custom create case button and the page plus apex code for the redirect to be used with the New case button.  Thanks for your input.

 

Create case custom button-

https://na8.salesforce.com/setup/ui/recordtypeselect.jsp?ent=Case&retURL=%2F500%2Fo&save_new_url=%2F500%2Fe%3FretURL%3D%252F500%252Fo&00NC00000059fMt={!Account.First_Name__c}&00NC00000059fMy={!Account.Name}&00NC00000059fMG={!Account.Email__c}&00NC00000059nPM={!Account.Service_Account_Number__c}&00NC00000059fN3={!Account.Phone}&cas16=Name:%0AAddress:%0APrimary Contact:%0ASecondary Contact:%0ADSLUsername:%0ADSL Password:%0ADSL Phone Number:%0ACABLE Modem MAC:%0AEMTA MAC:%0AShentel Phone Number:%0ASTB Serial number:%0AAvailability:%0AContact Customer Prior to Visit:%0ATicket Notes:%0AAware of Charges:%0ADirections:

 

New Button Redirect VF page-

<apex:page standardController="Case" extensions="newbuttonredirect" action="{!pageredir}">

</apex:page>

 

New Button Redirect Apex class -

public class newbuttonredirect
{

public newbuttonredirect(ApexPages.StandardController controller)
{

}
public Pagereference pageredir()
{
    Pagereference newpage = new Pagereference ('/500/e?nooverride=1&cas16=Name:%0AAddress:%0APrimary Contact:%0ASecondary Contact:%0ADSLUsername:%0ADSL Password:%0ADSL Phone Number:%0ACABLE Modem MAC:%0AEMTA MAC:%0AShentel Phone Number:%0ASTB Serial number:%0AAvailability:%0AContact Customer Prior to Visit:%0ATicket Notes:%0AAware of Charges:%0ADirections:&retURL=/500/o');
    return newpage;
}
}

  • June 27, 2012
  • Like
  • 0

I'm trying to use a VF redirect page to auto fill a field when a user creates a new case under the case tab. The redirect is working and the field is being auto filled. The issue is when the cancel button is clicked on the new case. Instead of going back to the default case screen it states the "URL No Longer Exists". I also noticed the URL is missing the /o at the end that the default case link normally has when not using the VF redirect page. How can i get the cancel button to work properly with the VF redirect?
Thanks for any help

Below is the VF page and then the APEX class


<apex:page standardController="Account" extensions="newbuttonredirect" action="{!pageredir}">
</apex:page>

-------------------


public class newbuttonredirect
{
public newbuttonredirect(ApexPages.StandardController controller)
{
}
public Pagereference pageredir()
{
Pagereference newpage = new Pagereference ('/500/e?nooverride=1&cas16=Name:%0AAddress:%0APrimary Contact:%0ASecondary Contact:%0ADSLUsername:%0ADSL Password:%0ADSL Phone Number:%0ACABLE Modem MAC:%0AEMTA MAC:%0AShentel Phone Number:%0ASTB Serial number:%0AAvailability:%0AContact Customer Prior to Visit:%0ATicket Notes:%0AAware of Charges:%0ADirections:&retURL=/500/');
return newpage;
}
}



  • June 22, 2012
  • Like
  • 0

Hello,

 

I am trying to fix an issue with a  trigger not working to update our account data on our salesforce org. We use the dataloader to upsert a .csv that is output from our local database to the cloud each night, which then using a trigger + apex class updates all the accounts on the cloud. However it has stopped updating the accounts. The data loader is still uploading the account data to the cloud. Looking over logs i found that the ID numbers have changed to a different format between the time the updates were working properly to now. When the updates were working properly the success log from the data loader had ID number such as the following 001C000000u35HpIAI, 001C000000u35HqIAI. The numbering for these same accounts now looks like a0LC000000WTDY8MAP, a0LC000000WTDY9MAP in the dataloader. I'm looking for a way to get the numbers back to what they were when the trigger was working. The .CSV file that has the customer data had no ID field. I'm not exactly sure where the ID numbers are being generated from or how to them to change, any help would be appreciated.  Mike

 
  • December 21, 2012
  • Like
  • 0

Hello folks,

 

                        I've been working on fixing a trigger we have setup on our salesforce domain. This trigger was setup more then a year ago  by someone else and at that time was working. However for quite awhile now it just does not seem to be firing at all. What the trigger is suppose to do is add to and update our salesforce customer accounts database from nightly uploads with the dataloader from our in house database info. The Dataloader is functioning correctly, with .csv file contents is being uloaded to the salesforce org. I can see the updated customer info as Customer Imports Object on the cloud. However the trigger is then supposed to take this info and update the actual Salesforce Account objects, which it is not. I've listed the Trigger and dependent class that maps all the data from the customer imports data to the accounts on the cloud, as well as the Account_import_c object description info. I have attempted to run logs on this trigger and it does not appear to be firing at all. Both trigger and class are valid and active. I have run tests on these and code coverage is 100% on the trigger and 98% on the class. Unfortunately i cannot contact the original author of all of this, i've been tasked with trying to get our salesforce accounts to be updated each morning again when the dataloader performs the upload to salesforce. Any help or insight as to what might be wrong with these would be greatly appreciated.  Thanks Mike

 

 

Here is the tigger accountImportAfterInsertUpdate.

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// ==================================================================================
//   Object: accountImportAfterInsertUpdate 
//
//  
// Comments: Automatically create Statement and Service Accounts, plus Contacts,
//           whenever a new Account Import record is inserted or upserted.
// ==================================================================================
//  Changes: 2011-07-05 Initial version.
// ==================================================================================

trigger accountImportAfterInsertUpdate on Account_Import__c (after insert, after update)
{
    // These records are coming from CommSoft. There is a single record in the CSV
    // file, from which we derive up to three separate records. We want to ensure
    // that no duplicate records are created but updates to existing records are
    // preserved. We also want to capture any import errors and store them on the
    // import record. This is why we are calling an @future class to do the actual
    // work, because we cannot directly update the record in an after trigger. 
    Set<Id> ids = system.trigger.newMap.keySet();
    importAccount.doImport(ids);
}

 

  
  • November 26, 2012
  • Like
  • 0

Hello,

 

                I'm looking for a little help with a validation rule. So far i have the following rule.

 

ISPICKVAL( Resolution_Type__c ,"Trouble")
&&
NOT(ISPICKVAL(Status ,"Working")
)

 

Which when Trouble is chosen from picklist then the case status has to be set to working in order to save. This is working great.

 

Now i'm looking to make this rule apply only for three individual users. I know i can use $User.Id <> "###" to specify some users but i'm just not sure on the syntax to make it work with the rest of the rule and make the rule only trigger for these specific users.  Any help would be greatly appreciated.  Thanks Mike

  • September 20, 2012
  • Like
  • 0

Hello, I'm trying to determine if a Workflow rule can be setup along with a field update to auto fill a simple text template into the Internal Comments text field when a user opens a new Case. For example some generic text such as First Name:, Last Name, Phone Number, etc to go into every new case Internal Comments field. This will be used as a template by the user to fill the proper info into this field.  If this is possible to do with a Workflow for the Internal Comments field I would be most appreciative for any info on how write the formula to do so. I'm new to working with Workflow Rules.   Thanks Mike

 

Here's an example of the formatting for the text template needed to be in the Internal comments field;

Name:

Address:

Primary Contact#:

Secondary Contact#:

Availability:

 

 

  • June 29, 2012
  • Like
  • 0