• KirstyFrance
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 14
    Replies

We deactivated all our  case escalation rules yesterday. This morning cases are still escalating.


Does anyone have any idea why?

I have a product lookup on a custom object. Unfortunately it does not seem possible to eliminate in active products from the lookup, meaning people can easily make mistakes. 

 

Does any one know of a simple solution for this?

A whole lot of tests that were working fine are suddenly producing errors on our production environment meaning the test coverage has fallen below 75% and we can't update anything.

 

While I have found a couple of genuine errors and fixed in the Sandbox ready to deploy, I'm at a loss to understand the majority of them.

 

Example 

System.AssertException: Assertion Failed: Expected: Benchmark, Actual: N/A	Class.testUKItemCodes.testUKItemCodes: line 47, column 5 External entry point

 When I actually create a record on the object that has the trigger which populates the value Benchmark in a text field, it works fine and I don't get N/A. 

 

But for some reason when the test class does the same action virtually, it gets a different value.

 

I'm really at a loss as I they were working fine until recently. 

 

We need to update some of the triggers due to product changes and can't because we can't get the test coverage up.


Any help or ideas would be appreciated.

 

Regards

 

Kirsty - Livebookings

Hello,

 

Does anyone know if it is possible to summarise data on a parent account from the accounts in its hierarchy. I know how to do this on an account from any child objects on that account, but can't find away to summarise information a the parent account level in relation to the accounts in its hierarchy.

 

An example would be that each account has a monthly revenue field, the monthly revenue field on the parent account should be the sum of the monthly revenue fields on all the account below it in the hierarchy?

 

Any help appreciated.

 

Kirsty

I created some very basic Apex triggers a while a go, that populate fields according to values in other fields. I am not a developer so I kept the code as basic as possible.

 

They all work fine.

 

However I have to occasionally update some of the values. Up until now I have always done this and redeployed the trigger to production. I am now getting an error "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required'

 

I've looked at some of the APEX documentation to see how to create a test, but I am having difficulty working out what I am meant to do. Up until now I have only created triggers and not classes.

 

I am not sure how to go about creating a test class for a trigger and don't understand why it has functioned up until now if this was necessary.

 

Any help appreciated.

 

Regards

KF

Hello,

 

I am getting frustrated because I have two very similar triggers, one of which works correctly while the other does not.

 

They both update fields based on the value of another field. One is a currency field another is a number field. Both these fields are read-only fields (unless you are an administrator).

 

The trigger that updates the currency field works correctly regardless of the user. However the trigger on the number field sets the default value of "0", unless it is an administrator updating the object.

 

Any help would be appreciated. 

Trigger that works trigger SetListPrice on Price_Plan__c (before insert,before update) { for (Price_Plan__c a : Trigger.new) { if (a.Item_Code__c== '1068') {a.List_Price__c = 10 ;} else if(a.Item_Code__c== '1069'|| a.Item_Code__c=='1069'|| a.Item_Code__c=='1081') {a.List_Price__c = 15 ;} else if (a.Item_Code__c== '1019' || a.Item_Code__c=='1074'|| a.Item_Code__c=='1083') {a.List_Price__c = 50 ;} else {a.List_Price__c = 0 ;} } } Trigger that does not work trigger SetCoverNumbers on Price_Plan__c (before insert, before update) { for (Price_Plan__c a : Trigger.new) { if (a.Item_Code__c== '1009'||a.Item_Code__c== '1021' ||a.Item_Code__c== '1043'||a.Item_Code__c== '1066'||a.Item_Code__c== '1082'||a.Item_Code__c== '1063') {a.Covers_Included__c= 50 ;} else if (a.Item_Code__c== '1083'||a.Item_Code__c== '1085') {a.Covers_Included__c= 250 ;} else if (a.Item_Code__c== '1083'||a.Item_Code__c== '1085') {a.Covers_Included__c= 750 ;} else {a.Covers_Included__c= 0 ;} } }

 

 

 

 

Hello,

 

I want to specify different default picklist values on a field called "Market" on a custom object according to the value of a field called "billing market" on the related account. The custom object is the detail of a master detail relationship with account.

 

Does anyone know if this is something you can do with a trigger?

 

Is there any way to make the default picklist value vary according to another parameter?

 

Regards 

I am not a programmer but have been learning to write some basic triggers to improve our Salesforce implementation. I have been obliged to replace the standard Asset object with a custom object that is a child object to accounts. A trigger written for the standard object has been recreated for the custom object. It worked perfectly on the standard object but does not on the custom.

 

The trigger is to set the Currency Iso Code of the object based on that of the related account. Does anyone know if there would be slightly different syntax for a custom object trigger? In the below I replaced Asset with the name of the custom object. Everything else is the same.

 

 

trigger SetPricePlanCurrency on Price_Plan__c (before update) { for (Price_Plan__c a : Trigger.new) { if(a.Set_Billing_Currency__c== 'EUR'){a.CurrencyIsoCode = 'EUR' ;} if(a.Set_Billing_Currency__c== 'CAD'){a.CurrencyIsoCode = 'CAD' ;} if(a.Set_Billing_Currency__c== 'CHF'){a.CurrencyIsoCode = 'CHF' ;} if(a.Set_Billing_Currency__c== 'DKK'){a.CurrencyIsoCode = 'DKK' ;} if(a.Set_Billing_Currency__c== 'GBR'){a.CurrencyIsoCode = 'GBP' ;} if(a.Set_Billing_Currency__c== 'NOK'){a.CurrencyIsoCode = 'NOK' ;} if(a.Set_Billing_Currency__c== 'SEK'){a.CurrencyIsoCode = 'SEK' ;} if(a.Set_Billing_Currency__c== 'USD'){a.CurrencyIsoCode = 'USD' ;} } }

 

 

 

I am trying to create a custom formula field on a custom object that is a child object to the account object. The formula sets the value of the field based on a picklist value on the account object. It works fine when I try it on a custom field on the asset object, but on my custom object I get a syntax error. 

 

When I use Account.CurrencyIsoCode to reference the currency field on the related account, I get the error "Field account does not exist". 

 

Does anyone know if formulas on custom objects work differently to standard objects?

 

Hi there,

 

I am looking for an application to allow the easy automated creation of tasks to remind account managers to keep in touch with there accounts according to a predefined schedule. E.g. monthly, quarterly or yearly depending on the category of account.

 

I have found one such application on the App Exchange, KIT by Application Experts, but was wondering if there were any similar applications to compare too?

 

Any help appreciated.

 

Regards

 

Kirsty 

I have a product lookup on a custom object. Unfortunately it does not seem possible to eliminate in active products from the lookup, meaning people can easily make mistakes. 

 

Does any one know of a simple solution for this?

A whole lot of tests that were working fine are suddenly producing errors on our production environment meaning the test coverage has fallen below 75% and we can't update anything.

 

While I have found a couple of genuine errors and fixed in the Sandbox ready to deploy, I'm at a loss to understand the majority of them.

 

Example 

System.AssertException: Assertion Failed: Expected: Benchmark, Actual: N/A	Class.testUKItemCodes.testUKItemCodes: line 47, column 5 External entry point

 When I actually create a record on the object that has the trigger which populates the value Benchmark in a text field, it works fine and I don't get N/A. 

 

But for some reason when the test class does the same action virtually, it gets a different value.

 

I'm really at a loss as I they were working fine until recently. 

 

We need to update some of the triggers due to product changes and can't because we can't get the test coverage up.


Any help or ideas would be appreciated.

 

Regards

 

Kirsty - Livebookings

Hello,

 

Does anyone know if it is possible to summarise data on a parent account from the accounts in its hierarchy. I know how to do this on an account from any child objects on that account, but can't find away to summarise information a the parent account level in relation to the accounts in its hierarchy.

 

An example would be that each account has a monthly revenue field, the monthly revenue field on the parent account should be the sum of the monthly revenue fields on all the account below it in the hierarchy?

 

Any help appreciated.

 

Kirsty

I created some very basic Apex triggers a while a go, that populate fields according to values in other fields. I am not a developer so I kept the code as basic as possible.

 

They all work fine.

 

However I have to occasionally update some of the values. Up until now I have always done this and redeployed the trigger to production. I am now getting an error "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required'

 

I've looked at some of the APEX documentation to see how to create a test, but I am having difficulty working out what I am meant to do. Up until now I have only created triggers and not classes.

 

I am not sure how to go about creating a test class for a trigger and don't understand why it has functioned up until now if this was necessary.

 

Any help appreciated.

 

Regards

KF

Hello,

 

I want to specify different default picklist values on a field called "Market" on a custom object according to the value of a field called "billing market" on the related account. The custom object is the detail of a master detail relationship with account.

 

Does anyone know if this is something you can do with a trigger?

 

Is there any way to make the default picklist value vary according to another parameter?

 

Regards 

I am not a programmer but have been learning to write some basic triggers to improve our Salesforce implementation. I have been obliged to replace the standard Asset object with a custom object that is a child object to accounts. A trigger written for the standard object has been recreated for the custom object. It worked perfectly on the standard object but does not on the custom.

 

The trigger is to set the Currency Iso Code of the object based on that of the related account. Does anyone know if there would be slightly different syntax for a custom object trigger? In the below I replaced Asset with the name of the custom object. Everything else is the same.

 

 

trigger SetPricePlanCurrency on Price_Plan__c (before update) { for (Price_Plan__c a : Trigger.new) { if(a.Set_Billing_Currency__c== 'EUR'){a.CurrencyIsoCode = 'EUR' ;} if(a.Set_Billing_Currency__c== 'CAD'){a.CurrencyIsoCode = 'CAD' ;} if(a.Set_Billing_Currency__c== 'CHF'){a.CurrencyIsoCode = 'CHF' ;} if(a.Set_Billing_Currency__c== 'DKK'){a.CurrencyIsoCode = 'DKK' ;} if(a.Set_Billing_Currency__c== 'GBR'){a.CurrencyIsoCode = 'GBP' ;} if(a.Set_Billing_Currency__c== 'NOK'){a.CurrencyIsoCode = 'NOK' ;} if(a.Set_Billing_Currency__c== 'SEK'){a.CurrencyIsoCode = 'SEK' ;} if(a.Set_Billing_Currency__c== 'USD'){a.CurrencyIsoCode = 'USD' ;} } }

 

 

 

I am trying to create a custom formula field on a custom object that is a child object to the account object. The formula sets the value of the field based on a picklist value on the account object. It works fine when I try it on a custom field on the asset object, but on my custom object I get a syntax error. 

 

When I use Account.CurrencyIsoCode to reference the currency field on the related account, I get the error "Field account does not exist". 

 

Does anyone know if formulas on custom objects work differently to standard objects?