• CRMScienceKirk
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 9
    Replies
Hi all,

I have a package where I have a new Custom Metadata Type and a few records for it included as components in it.  Within the Post Install Script class, I query for this Custom Metadata Type's records for the purposes of creating other custom object records.  However, during the post install, I receive an exception that that Metadata Type "is not supported."

Outside of the Post Install, I have a simple Visualforce page that displays a table of rows derived from the same query - no issues.

Post Install = no access to Metadata Type object
On-demand through VF = no problems

Does anyone have any thoughts around this?
I have a need where I want to prevent certain components (in this case a few Apex Classes) from ever being included in a Package (unmanaged or managed).  They shouldn't be able to be manually added or added automatically by reference.

Short of naming the classes in the error proof "DontPackageMe" fashion - does anyone have any ideas
Playing the customer support game again...  Originally logged as a case, deemed out of scope warranting "developer support" and promptly closed.  Case copy/pasted below with the org specific details removed for any of you "support representatives that work the boards to answer questions."   Obviously you can't do anything without the Ids.

Not inquiring for developer support, just additional log info from Salesforce about some previously executed scheduled jobs.

1. Brief description of the issue:
A Customer's org has an hourly scheduled Apex job that is responsible for creating some necessary records. It has come to our attention that a job ran, but did not complete successfully. However, it is too late to obtain any information from Setup --> Apex Jobs.

Date/Time: 2/25/2015 12:30:08 PM
Apex Class: <removed>
Apex Method: <removed>

Is it possible for you to retrieve any information about that job?

Secondary to that request, there are more recent jobs that ran and failed due to a null exception and a time out - can you provide any insight to these jobs?

<removed>: First error: Read timed out
<removed>: First error: Attempt to de-reference a null object
<removed>: First error: Attempt to de-reference a null object
<removed>: Read Time Out

2. Org ID: <removed>

3. Login access granted on admin user and affected user:
Granted for <removed>@<removed>.com (<removed>)

4. Exact replication steps:
Navigate to Setup --> Apex Jobs. You won't be able to navigate far enough back for the first request on 2/25 and for the others, you'll see the same jobs and error messages.
Hi all,

When performing callouts from Salesforce to various remote endpoints, we'll occassionally/intermittently receive a "bad_record_mac" error.  Sometimes they are persistent and don't go away after a period of time, othertimes the next callout works without a problem.

Doing some Googling, it doesn't see to be an uncommon issue in the Java world, but the resources that are more Salesforce centric are very few in number.  Those resources revolve around enabling or limiting various forms of SSL on the server (SSLv3, TLSv1, etc), but there's not a lot of information around the cause and as you imagine, no difinitive solution or response from Salesforce about it.

Does anyone successfully debugged these issues or have more information about why these Salesforce originating responses are dropping at the endpoint?

Thanks in advance!
Hi all,

When performing callouts from Salesforce to various remote endpoints, we'll occassionally/intermittently receive a "bad_record_mac" error.  Sometimes they are persistent and don't go away after a period of time, othertimes the next callout works without a problem.

Doing some Googling, it doesn't see to be an uncommon issue in the Java world, but the resources that are more Salesforce centric are very few in number.  Those resources revolve around enabling or limiting various forms of SSL on the server (SSLv3, TLSv1, etc), but there's not a lot of information around the cause and as you imagine, no difinitive solution or response from Salesforce about it.

Does anyone successfully debugged these issues or have more information about why these Salesforce originating responses are dropping at the endpoint?

Thanks in advance!
Hello,

I currently have a trigger to count the number of tasks related to an Account. The trigger works for the most part, it does not work when an Account is merged with another Account. Can someone assist in helping me find why the code is not recounting the activity upon the change of the What.ID on the task?

Below is the code.


trigger SumTasksTrigger on Task (after insert, after update, after delete) {

    set<Id> set_id = new set<Id>();
    
    List<Account> acc_list = new List<Account>();
    
    if(Trigger.isInsert || Trigger.isUpdate){
        for(Task T: Trigger.new){
            set_id.add(T.WhatId);
            
        }
        
    }
    
    else if(Trigger.isDelete){
        for(Task T: Trigger.old){
            set_id.add(T.WhatId);
            
        }
        
    }
    
    if(Trigger.isAfter &&(Trigger.isInsert || trigger.isUpdate ||  Trigger.isDelete)){
        acc_list = [SELECT Id, Number_of_Tasks__c,(SELECT Id FROM Tasks WHERE Status = 'Completed' AND (CS_Activity__c = FALSE)) FROM Account WHERE Id IN: set_id];
        
        for(Account acc: acc_list){
            if(acc_list.size()>0)
                acc.Number_of_Tasks__c = acc.Tasks.size();
            else
                acc.Number_of_Tasks__c = 0;
        
    }
    
    if(!acc_list.isEmpty())
        update acc_list;

}

}
I have a map with id and Account map<id, account> here the sample code
map<id, Account> updateAccts = new map<id, Account>();
List<Account> getAccts = [SELECT id, Case_Mailed_to_Group__c, Case_In_Work__c, CKE__C FROM Account WHERE ID in: caseAccUpdateIds ];

for(Account a: getAccts){
   if(updateAccts.containskey(a.id){
     
         //update account field in the map   HOW update CKE__c field on account
        Account ac = updateAccts.get(a.Id);
        ac.CKE__C = a.CKE__C;  //not working
   }eles{
      updateAccts.put(a.id, a);
   }
}
update updateAccts.values();
Hello

I want to create an opportunity for every quarter for every account at the beginning of every quarter. can someone suggest a solution. Since soql allows only 1000 records and there could be more than a 1000opptys  being created, can someone suggest solution please
Hello, I am experimenting the SSO in a sandbox. I have deployed a custom domain and have SSO working. Now I am testing 3rd party tools that I uset to access my org. I accessed the org with dataloader without an issue. I'm running into problems with Workbench. From the login page: https://workbench.developerforce.com/login.php

I choose the 'Log into a custom domain' option, and enter the domain. The result upon clicking the Continue buttion is red border appears around the domain. No error message. 

has anybody else ran into this?

Thanks!
Hi,

Because of SSLv3 Poodle vulnerability, we have turned off SSLv3 support on our web server. This in term is causing Salesforce outbound messaging to fail.

Is there a work around with this from Salesforce end?

The outbound messaging processing issue was resolved once we turn SSLv3 back on our web server.

Ted Tsung
Hi all,

When performing callouts from Salesforce to various remote endpoints, we'll occassionally/intermittently receive a "bad_record_mac" error.  Sometimes they are persistent and don't go away after a period of time, othertimes the next callout works without a problem.

Doing some Googling, it doesn't see to be an uncommon issue in the Java world, but the resources that are more Salesforce centric are very few in number.  Those resources revolve around enabling or limiting various forms of SSL on the server (SSLv3, TLSv1, etc), but there's not a lot of information around the cause and as you imagine, no difinitive solution or response from Salesforce about it.

Does anyone successfully debugged these issues or have more information about why these Salesforce originating responses are dropping at the endpoint?

Thanks in advance!

I have this trigger written, which passed validation no problem. THe trigger works in Sandbox but will not deploy in production;

 

Below are the warnings:

 

 

Commission_Calculation__c.Practitioner_Account__cCustom Field Definition7313cannot create two master detail fields with the same domain on one objectGenerateCommissionApex Trigger139Didn't understand relationship

 

 

'Commission_Calculations__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

 

Here is the trigger:

 

trigger GenerateCommission on Revenue_Event__c ( after insert )
{
    //  build a set of Accounts (doctors) related to each Revenue Event in this trigger
    Set<Id> set_AccountIDs = new Set<Id>();

    for ( Revenue_Event__c event : Trigger.new )
    {
        set_AccountIDs.add( event.Account__c );
    }

    //  query the Account records (doctors) related to the Revenue Events in this trigger
    Map<Id,Account> map_Doctors = new Map<Id,Account>
    (   [   SELECT  Id, (SELECT Id, Practitioner_Account__c, Sales_Agent__c FROM Commission_Calculations__r WHERE Active__c = true)
            FROM    Account
            WHERE   Id IN :set_AccountIDs
        ]
    );
    if ( map_Doctors.isEmpty() ) return;

    List<Commission__c> list_Commissions = new List<Commission__c>();

    //  for each Revenue Event,
    for ( Revenue_Event__c event : Trigger.new )
    {
        //  look up the associated Account (doctor)
        Account doctor = map_Doctors.get( event.Account__c );

        //  for each Commission Calculation related to the Account (doctor),
        for ( Commission_Calculation__c calculation : doctor.Commission_Calculations__r )
        {
            //  create a new Commission record
            list_Commissions.add
            (   new Commission__c
                (   Revenue_Event__c            = event.Id,
                    Sales_Agent__c              = calculation.Sales_Agent__c,
                    Commission_Percentage__c    = calculation.Id
                )
            );
        }
    }
    //  insert the new Commission records into the database
    insert list_Commissions;
}

 

 

If anyone has thougths, I would appreciate them!

Hi:

 

I have utilized angular JS in visualforce page aling with apex class to make a enhance dynamic search of transaction data in salesforce. The way it is done now is the following.

 

1) Apex Class executes a SOQL which returns a JSON string of data elements.

2) Visual force page which incorporates angular JS shows the data, with a search box on top.

 

Problem:

==========

Some of the objects is returning more than 50000 rows, and governor limit exception is thrown. 

 

Question:

==========

How can I invoke to get chunks of 100 records, the user will search from that 100 records, if the search data do not exist, then "Show More" button will retrieve the next 100 records.

 

Any help is really appreciated.