• ReidC
  • SMARTIE
  • 1624 Points
  • Member since 2010

  • Chatter
    Feed
  • 54
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 505
    Replies
I'm doing Lightning Components Basic - Input Data Using Forms, and I am running into an error I can't figure out.

I've reduced it here to the minimum code I can for reproducing the error, and I'm hoping someone can explain to me what's causing it.

campingApp.app
<aura:application extends="force:slds">
    <c:campingOneNewItem />
</aura:application>

campingOneNewItem.cmp
<aura:component >
    <aura:attribute name="items"
                    type="Camping_Item__c[]"/>
    <aura:attribute name="newItem"
                    type="Camping_Item__c"
                    default="{
                             'sObjectType': 'CampingItem__c',
                             'Quantity__c': 0,
                             'Price__c': 0
                             }"/>
    <form>
        <lightning:input type="number"
                 label="Quantity"
                 name="campingitemquantity"
                 value="{!v.newItem.Quantity__c}"
                 min="1"
                 aura:id="newcampingitemform"
                 messageWhenRangeUnderflow="Enter an amount that's at least 1"/>
        <lightning:button label="Add quantity"
                          onclick="{!c.addQuantity}"/>
    </form>
    <ol>
        <aura:iteration items="{!v.items}" var="item">
            <li><c:campingListItemSimple item="{!item}"/></li>
        </aura:iteration>
    </ol>
</aura:component>

campingListItemSimple.cmp
<aura:component >
    <aura:attribute name="item"
                type="Camping_Item__c"
                required="true"/>
    <h2>Quantity</h2>
    <p>
        <lightning:formattedNumber value="{! v.item.Quantity__c}" style="number"/>
    </p>
</aura:component>

campingOneNewItemController.js
({
	addQuantity : function(component, event, helper) {
        // Get current items
        var items = component.get('v.items');
        // Create the new item
        var newItem = component.get('v.newItem');
    
        // Copy the expense to a new object
        // THIS IS A DISGUTING, TEMPORARY HACK
        var newItem = JSON.parse(JSON.stringify(newItem));
    
        // explicitly casting newItem.Quantity__c to Number had no effect:
        // newItem.Quantity__c = Number(newItem.Quantity__c);

        items.push(newItem);
        component.set("v.items", items);
	}
})

campingApp renders like this:
User-added image

But when I click Add quantity I get an error:

Sorry to interrupt
This page has an error. You might just need to refresh it. Action failed: lightning:formattedNumber$controller$init [Value number out of range for numberformat options property style] Failing descriptor: {lightning:formattedNumber$controller$init}

User-added image

I'm pretty sure that somehow Quantity__c is being cast to string, but even when I explicitly cast it to number before calling component.set I get this error.
Hello,

I'm doing a 'Visualforce Basics' module and I'm stuck at 'Use Standard Controllers' Unit (link here).
I created a page with the following code:
 
<apex:page>
    <apex:pageBlock title="Account Summary">
        <apex:pageBlockSection>

        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>

Then I opened a page via the "Preview" button in a Developer Console and opened a JavaScript console in Chrome where I typed:

$A.get("e.force:navigateToURL").setParams({"url": "/apex/AccSum"}).fire();
And I got the following error:
Uncaught ReferenceError: $A is not defined at <anonymous>:1:1
 

Both the snippets are copied from the Unit's sections, I didn't change anything except the page's name - 'AccSum'. I tried all of the above in a Firefox which also did not work.

Does anyone know what's going on?

Can anyone help me out with the answers for the below questions? I shall appreciate your help.

1)Tell me abt urself.
2)What is difference b/w Before insert and After insert?
3)Scenario : i want to insert records in account and contact obj?whc type of event due to use.
4)Have u worked on test method?when is this start and stop method used?
5)can v write a test class without giving start and stop methods?
6)Scenario : i want to create a user and a contact to the user?how do u write thru a trigger?
7)can v write Soql in test classes?
8)Have u created vf pages?on which based reqirements?
9)what is the diff b/w Standard ,custom and extension ctrll?how many ext can be given?
10)Scenario : i have a ctrll and 2 extension with same method as Add contact .so whc ext method is used and why?
11)what is the method to call a Controller through javascript?
12)what is the difference b/w action function,action support?Explain me with a Scenario?
13)what is the difference b/w with sharing and without sharing?
14)what is a user mode and system mode?
15)Can apex class on user mode?
16)what is agile method?
17)HAve u worked on Batch class?
18)Scenario :Using batch class i would like to insert records 10000 records in account and 10000 records in contact .so how many batch classes wil u write?
19)i have 2 batch class - As A and B .How do i identify  which class is running whether its a A class or B class.If the B class is running how do u come to know that the A class got completed.
20)Scenario : I have 10 users with sales rep as their profile.i want 10 users to view account and no edit option?how can i achieve this?
b)i  want 10 users to have  edit option?how can i achieve this?
21)what are record types?

  • February 07, 2014
  • Like
  • 0
Hi,

when iam approach to My ISV AE regarding Business Org(APO) for uploading my APP to AppExchange.

i got a reply from him as

"I manage ISV Partners in the Tri-state area. Are you looking to be in the program? Is your application an API-only or Managed Package"

im confuse with his reply so can any one make it clear and what is difference b/n  API-only or Managed Package?
Hi,

Is it possible to use data loader command line to read data from a CSV file and UPSERT into Salesforce contact by a schedule time?

Thanks.

Having the hacker pass is enough?  or do I need to have a pass to dreamforce in addition?

Users on my system use console to enter data and user a lead view at the top of the screen, and add comments in the add a new task.

 

They have asked that the comment (from new task) be added to the lead view at the top of the console screen. 

 

However, although I can change the fields and criteria of the list view displayed I cannot add the data from the new task (specifically the comments).

 

Does anyone know how I can achieve this ?

 

Thanks

 

Steve

It seems like this report would be simple to create but I need assistance in creating a report that shows the number of logins for each user by month. Ideally, the months would be on the horizontal axis with the users along the vertical axis showing a summarized #of logins by month. Is this possible? If so, can anyone assist?

How can we remove the Standard salesfore objects which we dont require in our app in summer 2013

Creating external public links for a uploaded documents

Hi,

 

I am trying to upload a managed package that we have uploaded in the past. This time I am getting an error (see below). Any idea what could be the solution?

 

 

 

An internal server error has occurred An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using salesforce.com!

Error ID: 829612027-7385 (714188556) 

Hi trying to make button called "transfer" on lead that will do 2 actions.

 

1- In field called Transfer rep: for current user;s name to be inputed there

2.in field called Transfer's date: input today's date

 

 

could anyone please help with that?

 

 

 

Thank you in advance

 

 

  • March 22, 2013
  • Like
  • 0

hey guys can someone help me write a unit test for my try catch block? I am able to get 82% of my APEX Rest, but having a hard time covering the catch line.

 

@RestResource(urlMapping='/getofflinedata/*')
global class WS_RestGetOfflineData {
	
	@HttpGet
	
	global static List <Address__c> queryAddres(){
		try{
			//Request and response parameters to and from the external client
			RestRequest req = RestContext.request;
			Restresponse res = RestContext.response;
			
			List<string> stringAccType= new List <String>();
			stringAccType.add('Some Values');
			
			// Query the Address object and return all records that meet the criteria in a List
			List <Address__c> addList = new List <Address__c>();
			
			addList = [select id, Name
			from Address__c 
			where AddType in: (stringAccType) Limit 5000];
			
			return addList;
			
		} catch (System.Queryexception ex){
			// throw query exception to external message.
			throw ex;
		}
	}
	

 and my test method so far:

static testmethod void testGetOfflineData(){
		try{
			RestRequest req = new RestRequest(); 
			RestResponse res = new RestResponse();
	 
			req.requestURI = 'https://cs10.salesforce.com/services/apexrest/getofflinedata/';  
			req.httpMethod = 'GET';
			RestContext.request = req;
			RestContext.response = res;
			
			
			List <Address__c> addList = WS_RestGetOfflineData.queryAddres();
		} catch (System.Queryexception ex){
			throw ex;
		}
			
	}

 

Also when I deploy this to my production what req.RequestURI should i embedd?

can i just do : req.requestURI = '/services/apexrest/getofflinedata/'; ?

 

Thanks

Double checking here..

 

I know that the Enterprise Edition is supposed to be the level needed to access the account via API. But is it the same conditions for ALL APIs on all levels so to speak? We are using the HTTP REST API to access sales objects, would full Enterprise edition really be needed?

Hi, I was wondering if anyone knew of any third party applications or methods I could use to enable single sign on (sso) for my Salesforce instance?

 

I am aware of SFDC native SSO methods, but I do not want that. Rather I prefer a non-SFDC application/method to perform SSO and I have a preferance of open source and relatively cheap/free applications.

  • March 07, 2013
  • Like
  • 0

how to create checkbox in visualforce

 

i used this code

<apex:selectCheckboxes value="{!temp}" />

Hello Reid,

 

i have a quick question:

 

Why you used Look up relationship, between, Milestone and Project and

a Master Details Relationship between Task and Milestone?

 

Thanks in Advance

 

--silvano

  • February 07, 2012
  • Like
  • 0

What's the easiest (or best) way to change the order of Milestones or Tasks displayed in the Gantt?  I can live with an alphabetical order for a little while, but when I have 20 or so Milestones, then I need to add one at line 12 (for example), it can become a bear to edit all Milestones after that one. just to make it sort properly.

 

I'm sure someone has already tackled this one...just wondering the best way to do it.  

 

 

I was about to customize a couple of objects from Milestones PM.  We want to add some custom fields and few record types & page layouts.  For example, we kinda use Projects like Opportunities and we are going to add a picklist field called Project Status.  

 

My question is: What am I getting into my messing with these objects?

Hello,

 

I registered for a developer account, because wanted to test Miletone PM.

 

I installed and everything was very smooth.

 

Now wanted to test with different users so i did the following:

 

  1. Created a new User with User License Salesforce Platform and Profile Standard Platform Users
  2. The user received the email and activated.
  3. But when i login with the User Credentials cannot see some of the tabs even if i set the Tab to Default On in the Profile
  4. I cannot make the new users see the custom objects.
  5. If i try to change the ownership of a Project to the new user it says that he must have read permissions in the object.

CAn somepne help?

 

Thanks in Advance

 

 

  • November 08, 2011
  • Like
  • 0

A user writes:

 

I have installed the App and set it up, however I am running into an error. It is not finding the address.
 
I have custom fields for Address, City, State, and Zip Code. Is this the reason it isn’t working?
 
Should I use the standard Address field that comes with Salesforce?

 

Good question!

 

Yes, if you want Find Nearby to work, you should use the standard address fields.

  • June 16, 2011
  • Like
  • 0

A user writes: "If I already have latitude/longitude coordinates, can I avoid the Geocoding process in the application?  Is there a way I can pull in the lat/long data I already have (sits in Salesforce) to map all my locations?"

 

Good question!  If you have Long Lat, no need to geocode.  If you have that data someplace else, you can either modify the code to refer to this other location or dataload it to the fields that Find Nearby expects.

  • June 16, 2011
  • Like
  • 0

1. Where can I get the source code for Milestones PM? It's Open Source, you can grab it over on https://github.com/ForceDotComLabs/Milestones-PM

2. Is there an issues list?  How do I report a bug?  Yes -- and you can create issues there too -- it's on GitHub.

3. How do I connect Milestones PM to Accounts, Contacts, My Custom Object, etc. -- see blog post Connect Milestones PM to Your Objects.

  • February 17, 2011
  • Like
  • 0

A Reader Writes: Can you use Picture Upload with Person Accounts?

  • February 10, 2011
  • Like
  • 0

A reader writes:

 

Our customer has reported some issues regarding “Maildrop – Mac-mail integration application“ quoted below..

"As I noted in the google doc, the mail integration with Apple Mail is sorely lacking, and basically just requires double entry. Since every single one of our deals involves heavy email back and forth that must be tracked, double-entering this data into any CRM makes it a non-starter."

Please help us to understand and solve this issue...

  • February 03, 2011
  • Like
  • 0

CMSForce2 is a free content management system from Force.com Labs.  This app is unsupported, but the community posts and answers questions here as well as on the salesforce.com community site.

 

1. I attempted to install CMSForce2 but received a failure message.  Why won't it install?  The most common problem is that you need an active Force.com site up and running at the time of install.  Post

2. Is there a managed app version of CMSForce2?  No.  CMSForce2 is only available unmanaged.

3. Is this the same as Siteforce?  No.  Siteforce is a product expected to be GA in 2011.

4. Can I insert multiple records with a single call?  Not out of the box (Post).

5. Can I use a picklist in a webform?  Yes (Post).

6. Why can't I add content to CMSForce2?  Your security is probably misconfigured. Check pages 3-4 of the install guide.  Post

  • January 31, 2011
  • Like
  • 0

A reader asks -- how does My Records filter work? 

 

So I've been reviewing the code this morning and the flow is:

 

* query for records of a type within the geo bounds

* filter out by owner

* filter out by other criteria (type, industry)

* display on a map

 

In testing, it appears that the My Records filter has something goofy on it.  It's probably related to the fact that's its using post filtering instead of query based filtering. 

 

If you have the code the controller in question is FindNearbyMap.cls and the method is "Search". 

 

The refactor we likely need is something that does a better job filtering the data at the query level. 

 

 

  • January 31, 2011
  • Like
  • 0

Hi,

 

Brackets is a tournament management app currently in beta.  Please feel free to ask questions and provide feedback.

 

Thanks!

Reid

 

  • January 07, 2011
  • Like
  • 0

[Coming Soon]

New Action Plans Place Template Import Listings will be here.

  • August 23, 2010
  • Like
  • 0

Had a couple of great questions come over via email (labs at salesforce dot com) which I wanted to share here.

 

Q: In a large organisation who would you envisage creating the templates and what security should be in place. The default after installation seemed to be private on both the templates and the action plans. And not sure that this covered in the documentation.

 

A: I have left the OWD as default for both objects for now although I’m not convinced that’s the best way to use them.  Depending on your org, you may want to make Action Plans private and Action Plan Templates Public Read Only.  Since the goal of AP is to encapsulate best practices into reusable task templates, the idea is that some expert creates and manages the templates which are then available to all / most users.  These users are then responsible for their individual Action Plans.  I could make a case for keeping Action Plans public as well — say, for example, if your OWD are public for all the objects you want to use AP with, then making the Action Plans private doesn’t really make any sense.

 

Q: Does it make sense to leave the default New Action Plan button on the related list? 

 

A: Re: the new button on the related list — in the upcoming new version (probably a couple of weeks out), we’ve removed that from the related list.  I go back and forth about where the best location for the button is.  I like it up top because an AP is generally more about the record than anything else.  An Action Plan cannot stand alone. 

 

Q: Did you envisage users creating action plans on the fly without a template?

 

A: Also, re: the question of templates — I don’t think it makes sense to create an action plan from scratch every time — too much work.  Templates are the way to go.

  • July 30, 2010
  • Like
  • 0
Welcome to the Force.com Labs discussion board -- I'm glad you're here.  This is an experiment in connecting Force.com Labs users with Force.com Labs authors.  Have a question about an app?  A feature request?  An app request?  Just want to talk about your favorite or least favorite?  You're in the right place.
  • March 02, 2010
  • Like
  • 0
I'm doing Lightning Components Basic - Input Data Using Forms, and I am running into an error I can't figure out.

I've reduced it here to the minimum code I can for reproducing the error, and I'm hoping someone can explain to me what's causing it.

campingApp.app
<aura:application extends="force:slds">
    <c:campingOneNewItem />
</aura:application>

campingOneNewItem.cmp
<aura:component >
    <aura:attribute name="items"
                    type="Camping_Item__c[]"/>
    <aura:attribute name="newItem"
                    type="Camping_Item__c"
                    default="{
                             'sObjectType': 'CampingItem__c',
                             'Quantity__c': 0,
                             'Price__c': 0
                             }"/>
    <form>
        <lightning:input type="number"
                 label="Quantity"
                 name="campingitemquantity"
                 value="{!v.newItem.Quantity__c}"
                 min="1"
                 aura:id="newcampingitemform"
                 messageWhenRangeUnderflow="Enter an amount that's at least 1"/>
        <lightning:button label="Add quantity"
                          onclick="{!c.addQuantity}"/>
    </form>
    <ol>
        <aura:iteration items="{!v.items}" var="item">
            <li><c:campingListItemSimple item="{!item}"/></li>
        </aura:iteration>
    </ol>
</aura:component>

campingListItemSimple.cmp
<aura:component >
    <aura:attribute name="item"
                type="Camping_Item__c"
                required="true"/>
    <h2>Quantity</h2>
    <p>
        <lightning:formattedNumber value="{! v.item.Quantity__c}" style="number"/>
    </p>
</aura:component>

campingOneNewItemController.js
({
	addQuantity : function(component, event, helper) {
        // Get current items
        var items = component.get('v.items');
        // Create the new item
        var newItem = component.get('v.newItem');
    
        // Copy the expense to a new object
        // THIS IS A DISGUTING, TEMPORARY HACK
        var newItem = JSON.parse(JSON.stringify(newItem));
    
        // explicitly casting newItem.Quantity__c to Number had no effect:
        // newItem.Quantity__c = Number(newItem.Quantity__c);

        items.push(newItem);
        component.set("v.items", items);
	}
})

campingApp renders like this:
User-added image

But when I click Add quantity I get an error:

Sorry to interrupt
This page has an error. You might just need to refresh it. Action failed: lightning:formattedNumber$controller$init [Value number out of range for numberformat options property style] Failing descriptor: {lightning:formattedNumber$controller$init}

User-added image

I'm pretty sure that somehow Quantity__c is being cast to string, but even when I explicitly cast it to number before calling component.set I get this error.
Help!!!  How do I add my list of products to my LEADS Page and my ACCOUNTS Page?  I want to be able to track what products I am offering when I am contacting LEADS, and what products my ACCOUNTS have or take in the future.  Seems like it should be easy...go to SETUP for each one (LEADS and ACCOUNTS) and add your product list...BUT, NO...THAT WOULD BE TOO SIMPLE.  Any help would be greatly appreciated.  Thank you.
 
The hands on challenge to install Dream house app is not working. It does not find my trailhead playground and yes, I am logged in.  The app will install on my SF Org! 
Hello,

I'm doing a 'Visualforce Basics' module and I'm stuck at 'Use Standard Controllers' Unit (link here).
I created a page with the following code:
 
<apex:page>
    <apex:pageBlock title="Account Summary">
        <apex:pageBlockSection>

        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>

Then I opened a page via the "Preview" button in a Developer Console and opened a JavaScript console in Chrome where I typed:

$A.get("e.force:navigateToURL").setParams({"url": "/apex/AccSum"}).fire();
And I got the following error:
Uncaught ReferenceError: $A is not defined at <anonymous>:1:1
 

Both the snippets are copied from the Unit's sections, I didn't change anything except the page's name - 'AccSum'. I tried all of the above in a Firefox which also did not work.

Does anyone know what's going on?

I'm just doing the Scrum related Trailhead courses, as I'm looking at ways I can start introducing Scrum fundementals to our organistion. In the Meet Scrum unit (https://trailhead.salesforce.com/trails/run-an-agile-team/modules/agile-frameworks-scrum-and-kanban/units/meet-scrum) one of the questions asks "Which artifact.....?" to which the correct answer on Trailhead was "Sprint". I got this wrong first time round, as I picked an answer that was closer to an artifact, as a Sprint is a ceremony (or meeting) and not an artifact. I know that this sounds really trivial, but we want to use all the appropriate Scrum terminology in our organisation to ensure that everyone has a common understanding, so anything that may introduce an element of confusion isn't going to help our cause. Is there a process of getting this question changed? Thanks.
We have built a working prototype for our marketing integration platform on force.com and it's currently running as a partner portal (clients are using partner portal seats for access.) If you're really interested, you can see a YouTube video of the platform at http://bit.ly/16aCdnb, but it's not necessary to watch the video to understand our questions.

It's time for us to make the move towards figuring out how best to build out our franken-app into a real commercial application, but we have SO MANY questions about how to proceed. We are completely bootstrapped, and are not looking to take on money or investors at this point. We have paying clients and are profitable. We have over 25 years of very relevant marketing experience, and have been running ad agencies for most of that time, so we're very familiar with the agency model and it's associated markups, so we're trying to avoid just handing the entire thing over to a dev shop until we are at least better informed about how to make that decision. For background, I've been a Salesforce admin since 2007, and have been teaching myself APEX, Java, javascript and Visualforce in order to build out the platform over the past three years, so I've done my homework, but now need expert advice. And this is all above board, no scamming or screen-scraping so if we're doing something wrong I want to know. We would prefer to work with the discussion forum to get some general direction, including how to select the right CTO (and whether that's even who we need).

So to just get this started, here are some of our questions:

1. We need to access data from a wide variety of other platforms, via licensed or free APIs. When allowed, do we want to copy that data off to our own servers so that we don't have to call for it each time, or do we avoid the expense and hassle of copying it and rely instead real-time API calls? Sounds basic, but i haven't been able to find an answer I'm comfortable with yet.

2. I assume the data that we do house should be on an external server, like S3, rather than salesforce, but need to understand the implications of integrating yet another system.

3. We currently import most client data via .csv exports from the source and then manually upload to our platform. This has allowed us to test and improve our data model and our workflows. I've been trying for a year to teach myself how to do all the coding necessary to use APIs but it's not happening yet. There are a couple APIs, such as Google Analytics, that would be great to have NOW, but I dont' want to waste money paying to have them built for the prototype if that's unwise. How do I estimate how much it should cost to build out a straightforward API such as GA with limited fields? Can we use the cookbook or app exchange API code for things like GA and Facebook as starting points and save time and money on development, or should we expect developers to want to write their own code from scratch even if there are examples already published?

4. HOW can we get anyone at Salesforce to care??? Partner team and ISV couldn't care less about responding to us. We have a million more, but this is enough to give an idea of what we need and for people to weigh in with suggestions.

Thanks in advance for your support!

Michael
Hi,

when iam approach to My ISV AE regarding Business Org(APO) for uploading my APP to AppExchange.

i got a reply from him as

"I manage ISV Partners in the Tri-state area. Are you looking to be in the program? Is your application an API-only or Managed Package"

im confuse with his reply so can any one make it clear and what is difference b/n  API-only or Managed Package?
Hi,

when iam approach to My ISV AE regarding Business Org(APO) for uploading my APP to AppExchange.

i got a reply from him as

"I manage ISV Partners in the Tri-state area. Are you looking to be in the program? Is your application an API-only or Managed Package"

im confuse with his reply so can any one make it clear and what is difference b/n  API-only or Managed Package?
We are facing an issue in Accounts. Sometimes we are getting an error like 'Unable to lock row' while saving/updating data. Is it related to Account Data Skew issue? But in our org, no Account has more than 10000 child records.

What may be the possible cause and solution to this? Please suggest.
Hi,

Is it possible to use data loader command line to read data from a CSV file and UPSERT into Salesforce contact by a schedule time?

Thanks.
hi everyone,

hi everyone,

i have a requirement where system send 3 email alerts to the owner of the record if a record (in custom ) is created in the system and record's status remains same for a week.
if after a week, the status of the record is still the same, i want to fire 3 email alerts each after a day to alert owner of the record.

i have tried time based workflow rule with 3 time depended actions. but it seems that if the criteria met at the time of creation of the records, the time based actions get queued and if the record status gets changed the next day, system still fire email alert.

need solution and don't want to write code.

thanks,

thanks,
Hi all! We've launched some new features here on the forums today - thanks to you all for your feedback on the new site! Here's today's update:
  • New "Start a Discussion"  button to make it easier for you to start a new thread (we still strongly encourage you to search the existing topics before you post though as it's very likely your topic has been addressed before!)
  • Infinite scroll starts higher up on the page to provide a smoother experience
  • Added a "Continue Reading" link on each discussion card
  • Fixed a bug affecting the display of dates on some profile pages
  • Fixes to how notifications are sent when you like or reply to posts
Our development team is actively working on site enhancements, so please keep the feedback coming!! Let us know what you think of the site and what you'd like to see.

Best,
April