• Matty B
  • NEWBIE
  • 9 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 4
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 16
    Replies
I've created a webservice via apexrest in our sandbox org that uses a Get method and returns json results. In order to do this I created a connected app and then sent a POST to /services/oauth2/token in order to get the Bearer Token to use for the web service. This worked fine on sandbox where we have no SSO setup but in Production we use Okta for SSO so therefore don't manage passwords. The POST required me to pass in the grant_type, client_id, client_secret, username, and password (which consisted of password+token). However with SSO there is no password or token managed in Production. So how do we achieve this with an SSO provider controlling the authentication?
I need to be able to calculate the number of hours between 2 date fields. In Wave Anlytics this doesn't seem to match with the available operators (COUNT, SUM, etc.).

I would think it should be able to be handled rather than importing this calculation in the actual ETL. Which approach should I be taking (SAQL or Compare tables or something else)?
  • September 29, 2016
  • Like
  • 0
hello fellow devs. i'm having an issue with linking to the detail record page of an account from within an aura iteration in a custom lightning component. it sounds pretty simple but causing some challenges. take the following code... it works but when i click the link to the account i get the lightning loading page and its slow to get to the account page. also from within SF1 it tries to open an external browser and requires login again.
 
<aura:iteration items="{!v.accounts}" var="account">
                        <tr>
                            <td><a href="{!'/' + account.Id}"><div class="slds-truncate">{!account.Name}</div></a></td>                 
                            <td>{!account.Owner.Alias}</td>
                            <td style="text-align:right"><ui:outputNumber value="{!account.Total_Amount__c}" /></td>
                            <td style="text-align:right;color:red">
                                <aura:renderIf isTrue="{!account.X30_Day_Totals__c lt -1500}">
                                    <c:svgComponent xlinkHref="/resource/SLDS212/assets/icons/utility-sprite/svg/symbols.svg#warning" class="slds-icon slds-icon-text-warning slds-icon--x-small" />&nbsp;
                                    <aura:set attribute="else">
                                    </aura:set>
                                </aura:renderIf>
                                <ui:outputNumber value="{!account.X30_Day_Totals__c}" />
                            </td>
                        </tr>
</aura:iteration>

I experimented with navigateToURL and navigatetoSobject and even sfone.navigateToUrl all with problems. if someone could provide the code sample of the component, controller, and helper methods (if necessary). it seems the SFDC dev document only provides the controller snippet.
  • September 20, 2016
  • Like
  • 0
Most of the limits I am aware of are around number of workflows on an object, number of field updates per workflow, etc.

if I have a workflow rule fire 3-4 updates every time the record is edited (no time based workflows) and an integration job updates 1M rows of data will Salesforce have any issue with processing 3-4 million field updates as a result? Woukd I expect any time delays?
Hi all,
I see some documentation online regarding Email Limits that seem to contradict one another. I want to know the difference between sending email via a workflow rule TO A CONTACT NOT A USER and an email template and sending emails via Apex TO A CONTACT NOT A USER.

First I see documention here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm#email_limits_section which specifies:

Outbound Email: Limits for Single and Mass Email Sent Using Apex
Using the API or Apex, you can send single emails to a maximum of 1,000 external email addresses per day based on Greenwich Mean Time (GMT). Single emails sent using the Salesforce application don't count toward this limit. There’s no limit on sending individual emails to contacts, leads, person accounts, and users in your organization directly from account, contact, lead, opportunity, case, campaign, or custom object pages.
When sending single emails, keep in mind:
You can send 100 emails per SingleEmailMessage.
If you use SingleEmailMessage to email your organization’s internal users, specifying the user’s ID insetTargetObjectId means the email doesn’t count toward the daily limit. However, specifying internal users’ email addresses in setToAddresses means the email does count toward the limit.
You can send mass email to a maximum of 1,000 external email addresses per day per organization based on Greenwich Mean Time (GMT). The maximum number of external addresses you can include in each mass email depends on your edition:

What exactly is meant by the sentence "Single emails sent using the Salesforce application don't count toward this limit". Is this config via email alerts? Apex Code leveraging setTargetObjectId? Both?

Then there is this article: https://help.salesforce.com/apex/HTViewHelpDoc?id=limits_email_workflow.htm&language=en_US

This one seems to be a calculation for 1,000 outbound emails per day per license. So we have 90 which means 90,000 outbound emails? Or is this both for outbound AND inbound emails?

I've built something that will send an email to all contacts at the accounts chosen. But I did this via a trigger which updates the contact with a checkbox which in turn fires a workflow rule and sends an email alert... we could send to 10,000 contacts in this case so I want to cover the bases here as I don't want to hit a limit as we have Email-to-Case and that could cripple the support organization. Any thoughts?
I want to backup the aura folder that contains my Lightning bundles. I don't see this metadata as a subscribe option in Eclipse or SublimeText (Maven's Mate). What am I missing and how can I access this to back everything up prior to a sandbox refresh?
Hi all,
in the LDS tutorial it talks about SVG4everyrbody to support SVG in IE. However it doesn't cover how to do this for Lightning Components with the Aura syntax. How do we alter the HTML and HEAD in a lightning app? I have seen some things showing jQuery and .append syntax but can't find a full tutorial on how to really set it up and what I am trying is still not rendering the SVG component.

Here is the beginning of my Lightning Component and including the svg4everybody:

<aura:component implements="forceCommunity:availableForAllPageTypes" access="public" controller="CustomerCommunityCustomHeaderController">

  <ltng:require scripts="/resource/svg4everybody/svg4everybody-master/dist/svg4everybody.js" styles="/resource/SLDS0121/assets/styles/salesforce-lightning-design-system-ltng.css" afterScriptsLoaded="{!c.doInit}" />   

then in my controller I have the doInit method for which I saw something similar online. when I see $ is that jQuery here? are we really saying I know need to load in jQuery? still couldnt get it to work even with that.

    doInit: function(component, event, helper) {      
      // add meta-http-equiv to the <head>
      $('head').append('<meta http-equiv="x-ua-compatible" content="ie=edge">');
      // start the svg4everybody helper
      $('body').append('<script>svg4everybody();</script>');  
    }
 
Hi all,
We have the state and country picklist enforcement on in our prod org. We also have integrations from other systems that create contacts. I was hoping that the integration would fail or not be successful for mismatches where we don't have that state/province for that country. However it appears this isn't the case since the integration job shows the records it inserted (which it will do if no faults are returned) but yet the one that had a state value that we did not have for the UK was not in the system.

Does anyone know if its possible to have SFDC send some sort of notification (similar to an APEX error message) to the admin for this type of failure?
All,
We have contacts that are Customer Community Users at Parent Accounts. These parent accounts have child accounts (using the standard Parent Account field we lookup to the Parent Account from the Child Account).

What is the best way to expose the cases for the community users that are at the Parent Account so that they see the cases created by users in the Child Accounts? There are lots of discussions on this for the old Customer Portal... but thing's have changed for the Community.
Hi all,
I've built a custom lightning header component for the Customer Community Template we are using. With the OOTB template (and when navigating from one screen to another via standard elements) I notice that the navigation loads up the body and not the full page (including re-loading the header). Right now I am using window.location within javascript on the Lightning buttons to open the page I want the user to navigate to. I don't think this is the best way to do it but can someone else provide some info on how the customer header can nicely render only the body portion of the Community on navigation from a custom lightning header and customer button?

Hi all,
When we perform SSO from 1 system to SFDC the user is authenticated fine but they are Service Cloud users leveraging the Service Console and we want their first page to be https://companyName.my.salesforce.com/console

However they receive an error that says "You can only view this page in a Salesforce console." Does anyone know why this would occur and how to fix it?

 

Hi. I have the following JSON being returned from a webservice callout and I want to loop over it and put it into a List<Object> via Apex and return that list to my lightning component.

Here is the JSON:

[{"SUMMARY":"testing1","CUSTOMERUSEREMAIL":"xyz@abc.com","CLOSUREDATE":"2011-11-29T11:35:09.000","OWNERNAME":"Jane Doe","CATEGORYNAME":"Finance and Billing","TICKETID":12345,"STATUSDESCRIPTION":"Closed","CREATIONDATE":"2011-01-17T10:16:00.000","CUSTOMERNAME":"CustomerTest123","STATUSNAME":"Closed","SLANAME":"Billing Query","CUSTOMERUSERNAME":"Customer 1","RESOLUTIONDATE":"2011-11-29T11:35:09.000"},
{"SUMMARY":"testing2","CUSTOMERUSEREMAIL":"abc@xyz.com","CLOSUREDATE":"2011-08-03T13:31:48.000","OWNERNAME":"John Smith","CATEGORYNAME":"Operational Request","TICKETID":98765,"STATUSDESCRIPTION":"Closed","CREATIONDATE":"2011-08-02T09:08:00.000","CUSTOMERNAME":"CustomerTest456","STATUSNAME":"Closed","SLANAME":"Terminations","CUSTOMERUSERNAME":"Customer 2","RESOLUTIONDATE":"2011-08-03T09:28:38.000"},
{"SUMMARY":"testing3","CUSTOMERUSEREMAIL":"testemail@test.com","CLOSUREDATE":"2011-09-06T13:19:17.000","OWNERNAME":"Customer 3","CATEGORYNAME":"Operational Request","TICKETID":01287,"STATUSDESCRIPTION":"Closed","CREATIONDATE":"2011-09-06T09:30:00.000","CUSTOMERNAME":"CustomerTest789","STATUSNAME":"Closed","SLANAME":"Activation 1-49","CUSTOMERUSERNAME":"Customer 3","RESOLUTIONDATE":"2011-09-06T13:19:17.000"}]

I have been trying to get this JSON rendered into a list via Apex with which I can display in a lightning component table. Searched all over online and tried various things but all had their own problems. I don't have a real custom SOBJECT for this I just want to use an Apex Object something like List<Object> foo = new List<Object> foo;

I tried things like having their own class... inner class... etc. Then I stumbled upon JSON2Apex (http://json2apex.herokuapp.com/). This generates a nice class and test class. However my problem is I need a list generated and this seems to only create 1 result. Has anyone had success with this? 

I try this where JSON2ApexTickets is my generated JSON2Apex class:

       JSON2ApexTickets myClass = JSON2ApexTickets.parse(res.getBody());

When I dump out the result like this to see the result:
        system.debug('myClass= ' + myClass);

I see the data coming back only for the first record in my JSON list. How do I get it to an object?
Hi all,
I see some documentation online regarding Email Limits that seem to contradict one another. I want to know the difference between sending email via a workflow rule TO A CONTACT NOT A USER and an email template and sending emails via Apex TO A CONTACT NOT A USER.

First I see documention here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm#email_limits_section which specifies:

Outbound Email: Limits for Single and Mass Email Sent Using Apex
Using the API or Apex, you can send single emails to a maximum of 1,000 external email addresses per day based on Greenwich Mean Time (GMT). Single emails sent using the Salesforce application don't count toward this limit. There’s no limit on sending individual emails to contacts, leads, person accounts, and users in your organization directly from account, contact, lead, opportunity, case, campaign, or custom object pages.
When sending single emails, keep in mind:
You can send 100 emails per SingleEmailMessage.
If you use SingleEmailMessage to email your organization’s internal users, specifying the user’s ID insetTargetObjectId means the email doesn’t count toward the daily limit. However, specifying internal users’ email addresses in setToAddresses means the email does count toward the limit.
You can send mass email to a maximum of 1,000 external email addresses per day per organization based on Greenwich Mean Time (GMT). The maximum number of external addresses you can include in each mass email depends on your edition:

What exactly is meant by the sentence "Single emails sent using the Salesforce application don't count toward this limit". Is this config via email alerts? Apex Code leveraging setTargetObjectId? Both?

Then there is this article: https://help.salesforce.com/apex/HTViewHelpDoc?id=limits_email_workflow.htm&language=en_US

This one seems to be a calculation for 1,000 outbound emails per day per license. So we have 90 which means 90,000 outbound emails? Or is this both for outbound AND inbound emails?

I've built something that will send an email to all contacts at the accounts chosen. But I did this via a trigger which updates the contact with a checkbox which in turn fires a workflow rule and sends an email alert... we could send to 10,000 contacts in this case so I want to cover the bases here as I don't want to hit a limit as we have Email-to-Case and that could cripple the support organization. Any thoughts?
All,
We have contacts that are Customer Community Users at Parent Accounts. These parent accounts have child accounts (using the standard Parent Account field we lookup to the Parent Account from the Child Account).

What is the best way to expose the cases for the community users that are at the Parent Account so that they see the cases created by users in the Child Accounts? There are lots of discussions on this for the old Customer Portal... but thing's have changed for the Community.

Hi all,
When we perform SSO from 1 system to SFDC the user is authenticated fine but they are Service Cloud users leveraging the Service Console and we want their first page to be https://companyName.my.salesforce.com/console

However they receive an error that says "You can only view this page in a Salesforce console." Does anyone know why this would occur and how to fix it?

 

I've created a webservice via apexrest in our sandbox org that uses a Get method and returns json results. In order to do this I created a connected app and then sent a POST to /services/oauth2/token in order to get the Bearer Token to use for the web service. This worked fine on sandbox where we have no SSO setup but in Production we use Okta for SSO so therefore don't manage passwords. The POST required me to pass in the grant_type, client_id, client_secret, username, and password (which consisted of password+token). However with SSO there is no password or token managed in Production. So how do we achieve this with an SSO provider controlling the authentication?

Hi,

I have a developer sandbox setup and I'm trying to build a lightning component using Lightning Data Services, described here - https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_load_record.htm and https://developer.salesforce.com/events/webinars/BuildAppsFaster

However, I get this error on saving the component -

"Failed to save undefined: No COMPONENT named recordPreview found: Source" 

What am I doing wrong?

  • October 28, 2016
  • Like
  • 0
hello fellow devs. i'm having an issue with linking to the detail record page of an account from within an aura iteration in a custom lightning component. it sounds pretty simple but causing some challenges. take the following code... it works but when i click the link to the account i get the lightning loading page and its slow to get to the account page. also from within SF1 it tries to open an external browser and requires login again.
 
<aura:iteration items="{!v.accounts}" var="account">
                        <tr>
                            <td><a href="{!'/' + account.Id}"><div class="slds-truncate">{!account.Name}</div></a></td>                 
                            <td>{!account.Owner.Alias}</td>
                            <td style="text-align:right"><ui:outputNumber value="{!account.Total_Amount__c}" /></td>
                            <td style="text-align:right;color:red">
                                <aura:renderIf isTrue="{!account.X30_Day_Totals__c lt -1500}">
                                    <c:svgComponent xlinkHref="/resource/SLDS212/assets/icons/utility-sprite/svg/symbols.svg#warning" class="slds-icon slds-icon-text-warning slds-icon--x-small" />&nbsp;
                                    <aura:set attribute="else">
                                    </aura:set>
                                </aura:renderIf>
                                <ui:outputNumber value="{!account.X30_Day_Totals__c}" />
                            </td>
                        </tr>
</aura:iteration>

I experimented with navigateToURL and navigatetoSobject and even sfone.navigateToUrl all with problems. if someone could provide the code sample of the component, controller, and helper methods (if necessary). it seems the SFDC dev document only provides the controller snippet.
  • September 20, 2016
  • Like
  • 0
Most of the limits I am aware of are around number of workflows on an object, number of field updates per workflow, etc.

if I have a workflow rule fire 3-4 updates every time the record is edited (no time based workflows) and an integration job updates 1M rows of data will Salesforce have any issue with processing 3-4 million field updates as a result? Woukd I expect any time delays?
Hi all,
I see some documentation online regarding Email Limits that seem to contradict one another. I want to know the difference between sending email via a workflow rule TO A CONTACT NOT A USER and an email template and sending emails via Apex TO A CONTACT NOT A USER.

First I see documention here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm#email_limits_section which specifies:

Outbound Email: Limits for Single and Mass Email Sent Using Apex
Using the API or Apex, you can send single emails to a maximum of 1,000 external email addresses per day based on Greenwich Mean Time (GMT). Single emails sent using the Salesforce application don't count toward this limit. There’s no limit on sending individual emails to contacts, leads, person accounts, and users in your organization directly from account, contact, lead, opportunity, case, campaign, or custom object pages.
When sending single emails, keep in mind:
You can send 100 emails per SingleEmailMessage.
If you use SingleEmailMessage to email your organization’s internal users, specifying the user’s ID insetTargetObjectId means the email doesn’t count toward the daily limit. However, specifying internal users’ email addresses in setToAddresses means the email does count toward the limit.
You can send mass email to a maximum of 1,000 external email addresses per day per organization based on Greenwich Mean Time (GMT). The maximum number of external addresses you can include in each mass email depends on your edition:

What exactly is meant by the sentence "Single emails sent using the Salesforce application don't count toward this limit". Is this config via email alerts? Apex Code leveraging setTargetObjectId? Both?

Then there is this article: https://help.salesforce.com/apex/HTViewHelpDoc?id=limits_email_workflow.htm&language=en_US

This one seems to be a calculation for 1,000 outbound emails per day per license. So we have 90 which means 90,000 outbound emails? Or is this both for outbound AND inbound emails?

I've built something that will send an email to all contacts at the accounts chosen. But I did this via a trigger which updates the contact with a checkbox which in turn fires a workflow rule and sends an email alert... we could send to 10,000 contacts in this case so I want to cover the bases here as I don't want to hit a limit as we have Email-to-Case and that could cripple the support organization. Any thoughts?
I want to backup the aura folder that contains my Lightning bundles. I don't see this metadata as a subscribe option in Eclipse or SublimeText (Maven's Mate). What am I missing and how can I access this to back everything up prior to a sandbox refresh?

Hi all,
When we perform SSO from 1 system to SFDC the user is authenticated fine but they are Service Cloud users leveraging the Service Console and we want their first page to be https://companyName.my.salesforce.com/console

However they receive an error that says "You can only view this page in a Salesforce console." Does anyone know why this would occur and how to fix it?

 

For the module "Using Images, Icons and Avatars" the docs state: "To use SVG spritemap image icons with Microsoft Internet Explorer 11 you will need to download a small script called svg4everybody." which you load as a static resource and then call the svg4everybody() function. The Trailhead says to use <script> tags, however, these are not allowed in the component markup, so I added the call into the lightning component controller. But they still do not show up.

Any idea how to get this working?
Hi. I have the following JSON being returned from a webservice callout and I want to loop over it and put it into a List<Object> via Apex and return that list to my lightning component.

Here is the JSON:

[{"SUMMARY":"testing1","CUSTOMERUSEREMAIL":"xyz@abc.com","CLOSUREDATE":"2011-11-29T11:35:09.000","OWNERNAME":"Jane Doe","CATEGORYNAME":"Finance and Billing","TICKETID":12345,"STATUSDESCRIPTION":"Closed","CREATIONDATE":"2011-01-17T10:16:00.000","CUSTOMERNAME":"CustomerTest123","STATUSNAME":"Closed","SLANAME":"Billing Query","CUSTOMERUSERNAME":"Customer 1","RESOLUTIONDATE":"2011-11-29T11:35:09.000"},
{"SUMMARY":"testing2","CUSTOMERUSEREMAIL":"abc@xyz.com","CLOSUREDATE":"2011-08-03T13:31:48.000","OWNERNAME":"John Smith","CATEGORYNAME":"Operational Request","TICKETID":98765,"STATUSDESCRIPTION":"Closed","CREATIONDATE":"2011-08-02T09:08:00.000","CUSTOMERNAME":"CustomerTest456","STATUSNAME":"Closed","SLANAME":"Terminations","CUSTOMERUSERNAME":"Customer 2","RESOLUTIONDATE":"2011-08-03T09:28:38.000"},
{"SUMMARY":"testing3","CUSTOMERUSEREMAIL":"testemail@test.com","CLOSUREDATE":"2011-09-06T13:19:17.000","OWNERNAME":"Customer 3","CATEGORYNAME":"Operational Request","TICKETID":01287,"STATUSDESCRIPTION":"Closed","CREATIONDATE":"2011-09-06T09:30:00.000","CUSTOMERNAME":"CustomerTest789","STATUSNAME":"Closed","SLANAME":"Activation 1-49","CUSTOMERUSERNAME":"Customer 3","RESOLUTIONDATE":"2011-09-06T13:19:17.000"}]

I have been trying to get this JSON rendered into a list via Apex with which I can display in a lightning component table. Searched all over online and tried various things but all had their own problems. I don't have a real custom SOBJECT for this I just want to use an Apex Object something like List<Object> foo = new List<Object> foo;

I tried things like having their own class... inner class... etc. Then I stumbled upon JSON2Apex (http://json2apex.herokuapp.com/). This generates a nice class and test class. However my problem is I need a list generated and this seems to only create 1 result. Has anyone had success with this? 

I try this where JSON2ApexTickets is my generated JSON2Apex class:

       JSON2ApexTickets myClass = JSON2ApexTickets.parse(res.getBody());

When I dump out the result like this to see the result:
        system.debug('myClass= ' + myClass);

I see the data coming back only for the first record in my JSON list. How do I get it to an object?
My org presently uses OpenCTI and a Call Center.  According to the release notes, Call Centers are not supported in Lightning, and indeed, the Call Center functionality disappears from Setup when Lightning is enabled.  This makes sense, because it is unclear how or where an OpenCTI softphone would appear in the Lighting UI.

But, what is the plan for supporting soft phones / OpenCTI / Call Centers and Lightning in the same org?

It looks like we either give up our softphone functionality or enable Lightning, but not both...thats an upgrade blocker!
I've started dabling in Lightning Components and worked through a tutorial last year and have done one of the trailheads a few days.  So I know how to code basic Lightning components and apps.  And I see in the metadata that these become AuraDefinitionBundles.  I also so an example of some code where a bit of JS is added to an empty VF page and that always a Lightning Component to be spun up inside a VF page.

What I want to do is take an exist VF page that is exposed to the internet as a SF "Sites" application and port it to Lightning.  What I included in the prior paragaph leads me to believe the page is codable.  Here's what I don't know.  When a Sites application is configured, you have to tell it what it has access to-- VF pages, Apex controllers, objects and fields, etc.  I don't know how you would give it access to the Aura bundle.  (Unless it's totally implicit and you don't have to and it automatically gets acces.)

Can anyone address the question of how to configure and deploy Sites application that includes a VF page that spins up an Lightning Component?
 
Hi

Are there any impacts (in native Salesforce functionality such as report etc) I  should be aware of when changing a master-detail field to a lookup ?

Many thanks
Ross