• KMForce
  • NEWBIE
  • 0 Points
  • Member since 2014
  • Kiran Machhewar


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 5
    Likes Given
  • 2
    Questions
  • 9
    Replies
Hi,
   Salesforce has two main storage Data Storage and File Storage. So does attachments counts against file storage as . I want to clarify that if I have 5000 attachments each of 4KB. So total would be 20MB file storage. So it will only count against file storage. Does this also get counted in data storage where each record takes 2k so 10 MB in Data storage. So total data usage would be 30MB or 20Mb just for File Storage? Thanks in advance. 
Regards,
Kiran Machhewar
Hi I need a clarification about when does the jQuery document ready event gets fired. I had a thought that when the document is completely loaded then it gets fired. YES IT IS. But it is also getting fired when you reRender the script which registers document ready event. (Ideally it should not because we are just reRendering not loading the page.) It would be very helpful if someone has any views on it.

Here is the code which gives above stated behaviour.
<apex:page showHeader="true" sidebar="true">
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"/>
<apex:form>
<apex:pageBlock>
  <apex:pageBlockButtons>
   <apex:commandButton  value="ReRenderPanel" action="{!null}" reRender="scriptPanel"/>
  </apex:pageBlockButtons>
  <apex:pageBlockSection id="scriptPanel">
   <script>
    jQuery(function(){ //document ready
     alert('Document is ready');
    });
   </script>
  </apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Hi,
   Salesforce has two main storage Data Storage and File Storage. So does attachments counts against file storage as . I want to clarify that if I have 5000 attachments each of 4KB. So total would be 20MB file storage. So it will only count against file storage. Does this also get counted in data storage where each record takes 2k so 10 MB in Data storage. So total data usage would be 30MB or 20Mb just for File Storage? Thanks in advance. 
Regards,
Kiran Machhewar
I have a visualforce page that is exposed on Force.com site publicly.

I've used cache = false attribute in <apex:page> tag, if I update anything in the page and try to view the site again in the same browser, I don't see the updated page. 
It shows me the old one before the update.

I'm using bootstrap in my vf page.

I've also tried these meta tags in the head section of the page, but still not able to get it working.
 
<meta http-equiv='cache-control' content='no-cache'></meta>
<meta http-equiv='expires' content='0'></meta>
<meta http-equiv='pragma' content='no-cache'></meta>

This is a major issue, as page will be pulling ever changing data.
 
Hi,

I'm working on converting our workflow rules to Processes and Flows so that they can be better consolidated and followed by the business.  I am running into the "Unhandled Error" message due to validation rules that are in place.  So, I'd like to determine the "errors" in my flows, and then pass the information into an apex class that will display the message that I use in my validation rules.

I feel as though I am close, but I'm unsure of how to access the invocable variables within the invocable method.  I get an error message on the last line of code when compiling, and am not sure how to accomplish my desired result.  I am pretty new to apex, so any guidance would be much appreciated.  Code and error message below.

Apex Class
public class OpportunityErrorHandling{
   
    // Get variables from flow/process
    public class varList {
        @InvocableVariable(label='Error Message' required=true)
        public String errorMessage;
        @InvocableVariable(label='Opportunity' required=true)
        public Opportunity opp;
    }
   
    // Add error
    @InvocableMethod(
        label='Adds an error to the record'
        description='Will display an error message to the page instead of the unhandled exception error')
    public static void addErrorMessage(List<varList> variables) {
        // Present error message to user
        variables.opp.addError(variables.errorMessage);
    }
}

Error Message
Error: Compile Error: Initial term of field expression must be a concrete SObject: List<OpportunityErrorHandling.varList> at line 17 column 9

Thank you,

Justin
Hello,

I wish to include :-
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
extenal library for Google maps in a lightning component.

It doesnt allow me to do so , it gives me the following error:-
Content Security Policy: The page's settings blocked the loading of a resource at http://maps.google.com/maps/api/js?sensor=false ("script-src https://ap1.lightning.force.com https://ssl.gstatic.com chrome-extension: 'unsafe-eval' 'unsafe-inline'").

I tried loading this script asynchronously as well , by creating dynamic <script> tag and loading the src. Still doesnt work.

Kindly let me know how I can get Google Maps to work in a Lightning Component.

Thanks in advance
 
Hi ,

I am getting all custom object list from the orgainization, but I am getting historical data objects. I don't want those objects in my list.
Can you please help any one.

List<Schema.SObjectType> allObjectsList = Schema.getGlobalDescribe().values();
Set<String> customObjectsList = new Set<String>();
                                            
        for(Schema.SObjectType objType : listOfAllObjects)
        {           
            Schema.DescribeSObjectResult objectResult = objType.getDescribe();
            if(objectResult.isCustom() && !objectResult.isCustomSetting())
            {               
                customObjectsList.add(objectResult.getName());                                                                                           
            }
        }

In customObjectsList I am getting 'Historical Data' Objects like abc__c_hd. I don't want '_hd' objects.

Thanks 
Venkat
Hi All, I am trying to fetch the list of fields for a custom object.. below is the code

String fieldNames = Field_Details.getFieldDetails('Inspection_Checklist__c');

my object definition is as

Singular Label -- Inspection Checklist
Plural Label -- Inspection Checklist
Object Name -- Inspection_Checklist
API Name -- Inspection_Checklist__c

I tried passing all possible values but it not returning anything. same code iis working for another Custom Object... Am i missing any thing.. please help

Thanks
Hi I need a clarification about when does the jQuery document ready event gets fired. I had a thought that when the document is completely loaded then it gets fired. YES IT IS. But it is also getting fired when you reRender the script which registers document ready event. (Ideally it should not because we are just reRendering not loading the page.) It would be very helpful if someone has any views on it.

Here is the code which gives above stated behaviour.
<apex:page showHeader="true" sidebar="true">
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"/>
<apex:form>
<apex:pageBlock>
  <apex:pageBlockButtons>
   <apex:commandButton  value="ReRenderPanel" action="{!null}" reRender="scriptPanel"/>
  </apex:pageBlockButtons>
  <apex:pageBlockSection id="scriptPanel">
   <script>
    jQuery(function(){ //document ready
     alert('Document is ready');
    });
   </script>
  </apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

I have a requirement to search data immediately  from around 16 salesforce orgs. Since connecting and getting data from a single org needs  two callouts, i easily hit the callout limit. Could anyone suggest me a work-around..

@future wont help as I need the result immediately

I have a custom save method that sets a Savepoint, does some inserts and either rolls back (using Database.rollback) if there's an error or redirects to one of the newly inserted records. I just started testing the roll back functionality and it is not working as I would expect. The insert is in fact rolled back, but instead of being sent back to the Visualforce page I was just on, I am sent to a Salesforce error page saying "Data Not Available". It seems to me like the roll back might be removing the view state of the Visualforce page or something strange.

 

public PageReference save() {
	Savepoint beforeInserts = Database.setSavepoint();
	if (trySave() == true) {
		return (new ApexPages.StandardController(record)).view();
	}
	Database.rollback(beforeInserts);
	return null;
}

private boolean trySave() {
    //do some validation and such
    try {
        insert record;
    }
    catch (Exception err) {
        ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, err.getMessage()));
        return false;
    }
    return false; //to test the roll back
}

 Has anyone seen something like this?

 

Thanks!

  • November 19, 2011
  • Like
  • 0

Hi all,

 

I'm reading page 206 on the Apex reference doc and it states that one Apex transaction can make 10 callouts to an HTTP request. If I need to make more than 10 callouts, what are all my options other than using the @future notation? I'm calling a geocoding webservice, and the app will be making closer to 200 callouts/day.

 

Any suggestions will be appreciated.

 

Thanks in advance.

In the documentaiton for SAQL I see that they qualify data that can be quried as being stored in a dataset. What's a dataset exactly? Is the the standard Apex data structures (Map, List, Set)? My hope is that this could play the role that LINQ plays in .Net.

The documentation I'm refering to:
http://www.salesforce.com/us/developer/docs/bi_dev_guide_eql/bi_dev_guide_eql.pdf
And my code for Oppertunity is this...what is my mistak and same as when i write for solution it also shows mw some error?


apex:page standardController="Opportunity">
  <apex:form >
<apex:pageBlock title="Opportunity Edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="save" />
<apex:commandButton action="{!cancel}" value="cancel"/>
<apex:commandButton action="{!save&new}" value="save&new"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Opportunity Information" columns="2">
        
        <apex:inputField value="{!Opportunity.Private}"/>
        <apex:inputField value="{!Opportunity.name}"/>
        <apex:inputField value="{!Opportunity.Type}"/>
        <apex:inputField value="{!Opportunity.LeadSource}"/>
        <apex:inputField value="{!Opportunity.Amount}"/>
        <apex:inputField value="{!Opportunity.CloseDate}"/>
        <apex:inputField value="{!Opportunity.NextStep}"/>
        <apex:inputField value="{!Opportunity.Stage}"/>
        <apex:inputField value="{!Opportunity.Probability(%)}"/>
       </apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Hi ,

I have two custom  fields and one roll up summary field to count child records on my Opportunity object Example: Field 1 , Field 2 and Roll up field. There is a validation rule created which fires  "when the count of Roll up summary field of child objects records are greater than Zero and when Field 1 value is changed", the error message says that "You cannot change the Field 1 value when Roll Up field value is greater >0".

The issue is we have an integration with third party system, they are trying to change Field 1 value and also Field 2 value together when Rollup summary is >0. There are recieving back the validation error message but Field 2 value is updated on opportunity record before the error is sent back to their system. 

When I tried same scenario from salesforce UI Interface, the valdiation fires without updating the value for Field 2 and record does not gets saved.

I am not sure why the Field2 value is udpated through API and validaiton rule is fired later.Can you please let me know if anyone has any idea about it.

Thanks
 
  • May 01, 2015
  • Like
  • 1
Hi All
I am sending a http request from salesforce to appery.I am getting 
Status=HTTP Version Not Supported, StatusCode=505

The same url is working when i did a test on hurl.it.Please help

http request:  https://api.appery.io/rest/1/db/collections/Locations?where={shift_id:{ $eq: "553de5b333b01887fd86e41c" }}