• Shivanath Devnarayanan
  • NEWBIE
  • 270 Points
  • Member since 2011
  • Salesforce.com MVP & Force.com MVP
  • Gurgaon and Kerala DG Leader


  • Chatter
    Feed
  • 10
    Best Answers
  • 0
    Likes Received
  • 4
    Likes Given
  • 4
    Questions
  • 84
    Replies
Hi All,

Needed one urgent help !!

While debugging an issue, I found there is an exception thrown in the debug logs for an Opportunity:

System.DmlException: Update failed. First exception on row 1 with id <<OPPORTUNITY ID>>; first error: FIELD_FILTER_VALIDATION_EXCEPTION, Value does not exist or does not match filter criteria.

Then I further checked - Related Lookup Filters associated with the Opportunity.

The Filter Criteria was -

XYZ : Account Name ID EQUALS Opportunity: Account Name ID

where XYZ is a REQUIRED LOOK UP field to the Opportunity.

Can anyone explain as what this filter criteria means. This would be really helpful.

Thank you!

S Kumar

How do you create a SOQL query for date ranges like:

  • Current Quarter
  • Previous Quarter
  • Next Quarter
  • Previous and Current Quarter

Thanks in advance

  • November 09, 2013
  • Like
  • 0

What is the best practices for saving client preferences that I can read to determine whether or not to turn "on"/"off" functionality?

 

If someone could give me an example and what the syntax would be to retrieve the data that would be very helpful.

 

Thanks so much in advance.

Hi,

 

How do I change the Console tab to Default On from Tab Hidden? Here is the catch, when I click on the edit button on a profile no option to change to Default On. Is this a Salesforce case to have them turn this feature on?

 

Thanks,

SC

  • March 22, 2013
  • Like
  • 0

Hi

 

I'm trying to query for month value from a date field f my custom object
like say ,
SELECT Id,Date__c from custom_obj__c where . . . . .
using date__c.getMonth() or MONTH(date__c). i get an error that "Invalid aggregate Function"

I dont want to create a formula field and query based on it . Is ter any possibility without creating formula field for date .
Thanks in advance

ajay

Hi There,

 

I want to know how to take a sandbox backup before it get refreshed.

 

Amruta

I have the requirement to disable most users (all users within a custom Profile) from being able to update their own profile - we will be importing that data from another, master source.  Is this possible?

  • June 27, 2012
  • Like
  • 0

ex : when the user  clicks on home tab  i want an alert wishing him good morning 

Hi I need to pass values from one page to another through php (formmail.php) and it is passing all fields except the ones starting with '00' example $00N20000003JXkJ

 

Is there a workaround?

 

Canwe custom change the names and IDs?

 

Thanks

  • April 09, 2012
  • Like
  • 0

Hey guys,

 

I am totally confused about the licensing and apps, I read the docs but can't make any sense out of it...

So let's say that for our company we would purchase the Enterprise Edition which has X number of licenses.

So the app I develope could be installed for X users of our company. Now if I want to start installing the app for some or all of our customers (outside of our company) how does that work? Do we need to get additional licenses? Would appreciate if anybody can explain.

 

Another issue im totally confused on is storage. So let's say we install our app for 50 customers (not in our company). I want to store some (temporary) data in a centralized location from all these 50 customers (they can be from different organizations). Is that possible? or will I have to use some outside sotrage and use the Web API?

 

Thanks in advance!

I've integrated with the EnergyStar API,

 

The calls to the System Working until recently I've been receiving this Error

 

System.CalloutException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

 

I tried looking through forum posts

  1. https://success.salesforce.com/answers?id=90630000000gq6JAAQ
  2. http://boards.developerforce.com/t5/Apex-Code-Development/callout-exception-PKIX-path-building-failed/td-p/99751
  3. http://boards.developerforce.com/t5/General-Development/System-CalloutException-sun-security-validator/td-p/549159

but Did not get me anywhere

 

  • Is this issue because of the Changes in Energy Star Severs 
  • Does Winter 14 release changed the certificate rules?
  • Because the integration was working fine till a while ago, and nothing in the system has changed.

Any  help is deeply appreciated !

I Would like to understand how to keep track of the DML from a batch.

 

Problem : I have a trigger that marks incoming cases as Unprocessed and then a scheduled batch that processes it and marks it "processed"  which in turn fires the trigger

 

Questions

  1. Does the static variable way of avoid recursion work for the batch context and the subsequent trigger
  2. Is the 2nd Trigger in a separate context
  3. if yes how do i keep track ?

Thanks in advance !

Hello Everyone,

 

The business case I have is : Send out Email Alerts when a User/Contact is added to the Case Team.

 

Sounds simple enough, but I tried going through and found that CaseTeamMember does not allow Triggers and Workflows.

 

Is there any way to send out the email alerts when a User/Contact is added to Case Team or am I missing something?

 

Appreciate any help

 

Thank you 

Hello guys,

Facing a puzzling problem, I'm not very sure as of how the Database.com Light Users sharing model works. I know they dont have record sharing available and has org wide sharing settings. so my question is 

 

when light user creates a records in org is it visible for everybody in the database org, is it the same Via REST API if i use same token

to give more depth here's a scenario 

 

2 light users A & B
A creates 10 records and B creates 15 records, when accessing through API of light user how many records can A see ? just his 10 or together (A+B) 25 ?

 

Thanks

I have multiple users in my org. I logged in using my crdentials. I gave a user some permissions to check on objects. Now I want to login as that user in my org and make changes. How do I do that?
  • January 26, 2015
  • Like
  • 0
Hi,

I've already scoured the internet looking for an answer to this. I'm basically trying to come up with a workaround to provide field history tracking on tasks. I've found related threads with suggestions to create a trigger or workflow rule that creates a new task or object record if a field is changed. I've seen some code examples, but nothing that quite fits the bill. I also read that workflow formulas cannot trigger off the ActivityDate field (?), and that this has to be done through Apex. I'm still very new to this.

I'd like to receive notification if an incomplete task's due date is changed. This notification should include the task ID, Subject, Related to, OwnerID (or better yet, UserID of the person who updated the field), old due date value and new due date value.

Any help would be greatly appreciated!
Hi All,

Needed one urgent help !!

While debugging an issue, I found there is an exception thrown in the debug logs for an Opportunity:

System.DmlException: Update failed. First exception on row 1 with id <<OPPORTUNITY ID>>; first error: FIELD_FILTER_VALIDATION_EXCEPTION, Value does not exist or does not match filter criteria.

Then I further checked - Related Lookup Filters associated with the Opportunity.

The Filter Criteria was -

XYZ : Account Name ID EQUALS Opportunity: Account Name ID

where XYZ is a REQUIRED LOOK UP field to the Opportunity.

Can anyone explain as what this filter criteria means. This would be really helpful.

Thank you!

S Kumar
I would like to upload a list into Pardot but I do not want that list to sync with SalesForce. Is this possible?
Hello Team,

Below is a requirement from one of our customers.

The objective is to have a parallel approval process on an object.
For Example, when a record is submitted for approval, it has to spawn multiple approval steps(more than 2) in Parallel (say, Approval from Legal team, approval from Finance team). Either of these steps can be approved/rejected in parallel by different sets of approvers.

We can find parallel approvers for a single approval step but not parallel approval steps in the configuration. Can anybody please guide here how to achieve this parallel approval steps?
Hi folks,
    Can anyone tell me what is the purpose of HasOptedOutOFEmail in contact and lead object

Thanks in advance
Karthick
HI,

I've a custom page where i will select a picklist value of 'Lead Status'(oppoutunity) and click the next button. I need to show only the selected value of the 'Lead Status' picklist field in the opportuinty 'New' page.


hello

I have a requirement to integrate salesforce with google adwords. so that we can create ,run and stop a campaign through salesforce. i just need a bit of help to start with code. we can integrate it with SOAP API. has anyone done it before?

Thanks in advance
Shailesh 
Get permission related information for security related objects
With the combination of PermissionSetAssignment and ObjectPermissions tables we can get permission information for objects (information such as users who can read account object information). But ObjectPermissions.SObjectType not support for all objects. i.e it doesn’t support for objects such as User, Group, Partner, Profile, Task etc …
So from where can I get security related information for those objects?
The permissionSet ID returns from API is different than the display one
I have permission set with ID XXXX (I can see that permission set information via http://<salesforce_url>/XXXX ).
When I query permission set data from PermissionSetAssignment via API. The PermissionSetAssignment.PermissionSet.ID have a different value for the same permission set.
For example that id value is similar to XXXXGAO. Anyhow I can access permission set via http://<salesforce_url>/XXXXGAO too.
So what is the relationship between these two ids? If I have one id (i.e XXXXGAO) how can I retrieve other one and vice versa?
Have another Trigger that is erroring out. Again, this is above my area of expertise. I can't see anything jumping out at me that would cause this to error , but I amm sure it's something simple. Also am I correct that this Trigger is simply updating the License lookup field on existing cases?

Trigger updateCasesByAccount on License__c (before update, before insert) {

  // To be SF Limit compliant we limit our sql calls by keeping as much as possible outside the loop
  Set< Id > licenseAccountIds = new Set< Id >();
  
  // Add each licenses related account id to the licenseAccountIds set
  // Also add each license to the licenses list
  Integer countC = 0;
  for (License__c lic:Trigger.new) {
    licenseAccountIds.add(lic.Account__c);
    countC  ++;
  }
  // Debug
  //trigger.new[0].Ship_Address1__c = 'Trigger found: ' + countC;
  
  // Get all cases related to the licenses based on account it
  List<Case> cases = [SELECT id, accountId, FPB_License__c, CaseNumber FROM Case WHERE accountId in: licenseAccountIds]; 
  
  // Create map of account id (key) to license id (value)
  Integer countM = 0;
  Map<Id,Id> oppmap = new Map<Id,Id>();
 for (License__c lic:Trigger.new) {
    oppmap.put(lic.Account__c, lic.Id);
    countM ++;
  }
  // Debug
  //trigger.new[0].Ship_City__c = 'Mapped: ' + countM;
  
  // Loop through csses and match to licenses using account id
  Integer countCA = 0;
  for (Case cas:cases) {
      // Use map ( basically hash table) to avoid more loops
        cas.FPB_License__c = oppmap.get(cas.accountId);
        
        countCA ++;
  }
  update cases;
  // Debug
  //trigger.new[0].Ship_City__c = 'Related Cases: ' + countCA;

}

How do you create a SOQL query for date ranges like:

  • Current Quarter
  • Previous Quarter
  • Next Quarter
  • Previous and Current Quarter

Thanks in advance

  • November 09, 2013
  • Like
  • 0

Hi Everyone,

 

I'm having a problem with Test Trigger it says 0%, I've done reasearch but still no luck or no idea how to do it.

my code as follows;

 

 

trigger disabilityChecked on Care_Recipient_Information__c (before insert, before update)
{

 

Boolean disability, chronic;

 

for (Care_Recipient_Information__c obj : Trigger.new)

{


if ((obj.DMD__c == true) ||
(obj.DS__c == true) ||
(obj.Learning_Disability__c == true) ||
(obj.Spina_Bifida__c == true) ||
(obj.Hearing_Disability__c == true) ||
(obj.Visual_Disability__c == true) ||
(obj.Dyslexia__c == true) ||
(obj.Physical_Disability__c == true) ||
(obj.Rare_Syndromes__c == true) ||
(obj.ID__c == true))


{
obj.DisabilityNumber__c = 1;
disability = true;
obj.Disability__c = disability;
}

 

else
{
disability = false;
chronic = false;
obj.Disability__c = disability;
//obj.chronic_Illness__c = chronic;
}

 

}//FOR

}//END

 

Thank you for the assistance,

  • March 24, 2013
  • Like
  • 0

Hi,

Is it possible to export to Excel with the filtering option turned on?  (Under Excel's 'Data' tab)

Presently, I have taken over manually exporting, leaving only the page intact (SF exports a page as HTML markup, and the data is exported as a table)

Here's an example of the Apex code:

public String exportGrid {
        get{
            String result = '<table><tr>'
                +'<td><b>Name</b></td><td><b>City</b></td><td><b>State</b></td>'
                +'<td><b>Zip</b></td><td><h>Country</h></td><td><b>E-Mail</b></td>'
                +'<td><b>Mobile</b></td><td><b>Home</b></td><td><b>Work</b></td>'
                +'</tr>';
            if( contactsExport == null )
                return '';
            for( Integer i = 0; i < contactsExport.size(); i++ )
            {
                result +='<tr>';
                
                if( contactsExport[i].name != null )    
                result +='<td><span>'+contactsExport[i].name+'</span></td>';
                else
                    result +='<td><span>&nbsp;</span></td>';
                ...
             }
       return result + '</table>';
        }
    }

 


Here's what the VF page look like:

<apex:page controller="ContactSearchController" apiVersion="26.0" contenttype="application/vnd.ms-excel#Search.xls" showChat="false" showHeader="false" standardStylesheets="false" sidebar="false" cache="true">
  <apex:pageBlock title="Contacts">
      <apex:outputText rendered="{!resultsAreLimited}"><b>These Results Were Limited to 4,000 Records</b></apex:outputText>
    <apex:outputText escape="false">{!exportGrid}</apex:outputText>
  </apex:pageBlock>
</apex:page>

 



Any help is appreciated.

Thanks,
Michael

Hi,

 

How can we implement OAuth for multiple client org and how to add remote access into a package?

 

Regards,

 

I have a VF page inline on a custom object. It has various custom fields, and upon saving it reloads just the section that the VF page is in, not the entire page. Additionally, it reloads the entire detail page [side bar header and all], not just the VF page. Is there a way to either have the entire window refresh, or have the inline area refresh with just the VF page, and nothing else.

Does the Opportunity Stage History object have any link to the opportunity? When I look in the schema browser in Eclipse and do a query on the Opportunity Stage History I don't see any link to the Opportunity that the history record is associated with.I need to query that object in Apex but I don't see a way to know what record is assocated with what opportunity.

 

Please let me know if there is something I am missing

 

Thanks,

Chris

I would like to upload a list into Pardot but I do not want that list to sync with SalesForce. Is this possible?

Hello All,

 

I am programming something which requires a lot of data to be kept in memory for the VF page. And, I am keeping that data in Map.

 

A button from the page causes this Map to be re-initiated, i.e., to be re-filled. 

 

Now, when I fill the map the first time, it eats up 90% of my heap space. And, to fill it next time, I have to empty it first.., or force it to be garbage collected. 

 

Here is what I have tried :

 

System.debug('Heap Size 0.1: ' + Limits.getHeapSize() + ' , ' + Limits.getLimitHeapSize()); MainMap = new Map<ID, List<MyClass>>(); System.debug('Heap Size 0.2: ' + Limits.getHeapSize() + ' , ' + Limits.getLimitHeapSize()); MainMap = null; System.debug('Heap Size 0.3: ' + Limits.getHeapSize() + ' , ' + Limits.getLimitHeapSize()); MainMap = new Map<ID, List<MyClass>>(); System.debug('Heap Size 0.4: ' + Limits.getHeapSize() + ' , ' + Limits.getLimitHeapSize());

 

And, here is the output it produces:

 

 

Heap Size 0.1: 937950 , 1000000 Heap Size 0.2: 929766 , 1000000 Heap Size 0.3: 929758 , 1000000 Heap Size 0.4: 929766 , 1000000

 

 

 

  As you can see, the heap size is not getting reduced at all, which means I cannot fill the collection again !!

 

Any pointers or ideas on how I should force this Map to be garbage collected / free up some memory ?

 

Help would be greatly appreciated !!

 

     


 

  • July 01, 2009
  • Like
  • 1

As you've probably just seend, we've just rolled out a new feature on the discussion boards called Accepted Solutions (AS).

 

I've posted all the details on the blog - please take a read - and let me know how it goes!

 

Regards,
Jon

not that you would ever need this, however it appears that the AJAX sforceClient does not like 15 charID's in Retrieve, so I ported this late last night from the java version posted elsewhere.

only tested for a short time, but it appears to work.

function normaliseSforceID( id) { // fluff up a 15 char id to return an 18 char id
 if (id == null) return id;
 id = id.replace(/\"/g, ''); // scrub quotes from this id
 if (id.length != 15) {
  //print('well, id is not 15, bye' + id + ' ' + id.length);
  return null;
 }
 var suffix = "";
 for (var i = 0; i < 3; i++) {
  var flags = 0;
  for (var j = 0; j < 5; j++) {
   var c = id.charAt(i * 5 + j);
   if (c >= 'A' && c <= 'Z') {
    flags += 1 << j;
   }
  }
  if (flags <= 25) {
   suffix += "ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(flags);
  } else {
   suffix += "012345".charAt(flags-26);
  }
 }
 return id + suffix;
}