-
ChatterFeed
-
14Best Answers
-
10Likes Received
-
1Likes Given
-
119Questions
-
214Replies
Trying to Display a related List for 2 Custom Objects
I used two custom objects in my org
We have Employees (SFDC_Employee__c) and we have Reviews (SFDC_SkillsDev_Review__c)
All I am trying to do is have a form that brings up the employee with their related reviews
However I am getting an error each time I try to reference the Id of the reviews in line 27 which is related to lines 22 to 35
Code Below
<apex:page standardController="SFDC_Employee__c">
<apex:form>
<apex:pageBlock title="Edit Employee">
<apex:pageMessages/>
<apex:pageBlockSection>
<apex:inputField value="{! SFDC_Employee__c.Name }"/>
<apex:pageBlockSection columns="1">
<apex:inputField value="{! SFDC_Employee__c.Name }"/>
<apex:inputField value="{! SFDC_Employee__c.Job_Function__c }"/>
<apex:inputField value="{! SFDC_Employee__c.Start_Date__c }"/>
<apex:inputField value="{! SFDC_Employee__c.Email_Address__c }"/>
</apex:pageBlockSection>
</apex:pageBlockSection>
<apex:pageBlockButtons>
<apex:commandButton action="{! save }" value="Save" />
</apex:pageBlockButtons>
</apex:pageBlock>
<apex:pageBlock title="Reviews">
<apex:pageBlockTable value="{!SFDC_Employee__c.Reviews__c}" var="review">
<apex:column>
<apex:outputLink
value="{! URLFOR($Action.SFDC_SkillsDev_Review__c.Edit, review.Id) }">
Edit
</apex:outputLink>
</apex:column>
<apex:column value="{!review.Name}"/>
<apex:column value="{!review.Period_Review__c}"/>
<apex:column value="{!review.Review_Type__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
- Howard Weinstein
- November 17, 2015
- Like
- 0
- Continue reading or reply
Create Counter Variable That Increments On Visualforce Page
I want to increment a Counter Variable that is incremented when products are added to a list. I've been failing at doing this. Either it throws a Null Pointer exception on the Visualforce page, or it doesn't show any incrementing in the OutPutPanel. Any assistance would be helpful.
Thanks.
Apex
public class StoreFront { public String message { get; set; } public Integer shopCart{get;set;} public PageReference shop(){ shopCart = 0; message = 'You bought: '; for (DisplayMerchandise p:products){ if(p.count > 0){ message += p.merchandise.name + ' (' + p.count + ') ' ; shopCart++; } } return null; } DisplayMerchandise[] products; public class DisplayMerchandise { public Merchandise__c merchandise{get; set;} public Decimal count{get; set;} public DisplayMerchandise(Merchandise__c item){ this.merchandise = item; } } public DisplayMerchandise[] getProducts() { if (products == null){ products = new DisplayMerchandise[]{}; for (Merchandise__c item : [SELECT id, name, description__c, price__c FROM Merchandise__c WHERE Total_Inventory__c > 0]) { products.add(new DisplayMerchandise(item)); } } return products; } }VF
<apex:page standardStylesheets="false" showHeader="false" sidebar="false" controller="StoreFront"> <apex:stylesheet value="{!URLFOR($Resource.styles)}"/> <h1>Store Front</h1> <apex:form > <apex:dataTable value="{!products}" var="pitem" rowClasses="odd,even"> <apex:column headerValue="Product"> <apex:outputText value="{!pitem.merchandise.name}" /> </apex:column> <apex:column headervalue="Price"> <apex:outputText value="{!pitem.merchandise.Price__c}" /> </apex:column> <apex:column headerValue="#Items"> <apex:inputText value="{!pitem.count}"/> </apex:column> </apex:dataTable> <br/> <apex:commandButton action="{!shop}" value="buy" reRender="msg"/> </apex:form> <apex:outputPanel id="msg">{!message}</apex:outputPanel> <apex:outputPanel id="cart">{!shopCart}</apex:outputPanel> </apex:page>
- Tyler Harris
- April 30, 2015
- Like
- 0
- Continue reading or reply
How to set CreatedById and CreatedDate for test class records?
I need to write a test class for a trigger that heavily involves the CreatedById and CreatedDate of a task. I can't input values for these fields in a test class, since they're not writeable.
How can I set the CreatedById and CreatedDate for the insertion of a task record in a test class?
Thanks!
-Greg
- ChickenOrBeef
- September 25, 2014
- Like
- 0
- Continue reading or reply
Urgent ISPICKVAL Help for Beginner
- CRMGeneralist
- September 30, 2008
- Like
- 0
- Continue reading or reply
VS Code - Compare metadata in different orgs
Using VS Code, I know how to compare files which are in the same project, but it seems that different orgs always need to be different projects. Is there an easy way to do this? We have multiple sandboxes which occassionally get a little bit out of sync and a quick code compare really helps take the mystery out of where the differences have cropped up.
Thanks!
- Big Ears
- October 17, 2019
- Like
- 0
- Continue reading or reply
lightning-record-form - render with sections
- Big Ears
- May 21, 2019
- Like
- 0
- Continue reading or reply
Ability to remove action overrides in Lightning whilst leaving them in place in Classic
Remove Overrides for Standard Buttons and Tab Home Pages (https://help.salesforce.com/articleView?id=links_customize_override_remove.htm&type=5)
However, step 3 describes options which not available within our org:
"Select No override (default behavior) for the experience whose override you want to remove (Salesforce Classic, Lightning Experience, or mobile)."
We've had a case open with Salesforce for a few weeks now and I can't seem to make any headway (they say the documentation team say that their documentation is correct, but also can't explain why I don't see the options that the documentation says should be there)
Being able to switch off the override in LEX would be ideal.
As we're in Lightning Console, using Lightning Components to override the override behaviour specifically for LEX still results in unwanted behaviours (tabs being opened unnecessarily, no access to inline editing, etc.) The only option remaining to us may be to have to re-build an object model specifically for LEX, which I'm sure isn't the desired approach when migrating to LEX
Is anybody able to confirm which is the expected behaviour and best practice for dealing with it?
- Big Ears
- May 10, 2019
- Like
- 0
- Continue reading or reply
Lightning Console - How are pages overridden with VF pages supposed to behave?
- It is a Lightning Console App
- I have Edit overrides on one Standard Object (Task) and one Custom Object
- In both cases, the override is as follows:
- The Class override is a VF Page
- The Lightning override states to "use the Classic override"
- In both cases, the selected VF page has not been marked as available for Lightning Experience
What are the expected behaviours if Lightning reverts to a classic override to a VF page which hasn't been marked as available for Lightning?
Also - When will it be possible to select "No override" in Lightning specifically?
- Big Ears
- April 09, 2019
- Like
- 0
- Continue reading or reply
Lightning Web Components - How can we populate fields on a lightning-record-form
I have created a Lightning Web Component which uses a lightning-record-form to pull in the details of the child record which is related to the current record. This is handled using a pretty simple set-up:
Template
<template> <lightning-record-form record-id={childRecord.data} object-api-name="childRecord__c" layout-type="Full" columns="1" mode="view"> </lightning-record-form> </template>
Javascript
import { LightningElement, wire, api, track } from 'lwc'; import getChildRecord from '@salesforce/apex/Contact_getChildRecordController.getChildRecord'; export default class Contact_CRSProfileLayout extends LightningElement { @api recordId; @track childRecordId; @wire(getChildRecord, {contactId : '$recordId'}) childRecordId; }
Apex Class
This is just a simple class which accepts the ContactId and returns the appropriate child record ID - Just a single line SOQL, effectively.
This works just fine, if the child record is already in the system.
However, if there isn't yet a child record in the system, I want the form to be displayed with the lookup to the current contact already populated. What I need to be able to do is access the lookup field and populate it with the current context record Id.
With aura components, this was possible, but I'm not sure how it would be achieved now? Is the record created in memory by lightning-record-form accessible to the javascript controller? If so, how?
- Big Ears
- March 25, 2019
- Like
- 0
- Continue reading or reply
SFDX - Lightning Web Components trailhead issue - Scratch Orgs being created as Sandboxes
I'm working my way through the "Lightning Web Components Basics" trailhead and I've been directed to the following resource:
https://github.com/trailheadapps/ebikes-lwc#installing-e-bikes-using-salesforce-dx
As part of that, we need to create scratch orgs. However, the scratch orgs being created from my dev hub are marked as "Sandbox" and also seem to be stuck in Classic, so I can't progress.
I've updated to the latest versions of the SFDX CLI and plug-ins, so I'm not sure what the issue is here.
- Big Ears
- February 15, 2019
- Like
- 0
- Continue reading or reply
POSSIBLE BUG - Lightning Experience - Edit override with nooverride option
1) Rely on the VF overrides which exist in classic This has numerous issues with navigation on multi-screen overrides (meaningful retURL attributes are not available to the VF page controller, so all button presses would need to be re-developed to handle LEX)
Lightning Component which uses e.force:editRecord event This event can't have "nooverride=1" applied to it, so forces the Browser into an infinite loop, as the edit behaviour gets caught in its own override.
Here is the component controller:
({ onInit : function(component, event, helper) { /*CAUSES INFINITE LOOP IN OVERRIDE CONTEXT*/ var editRecordEvent = $A.get("e.force:editRecord"); editRecordEvent.setParams({ "recordId": component.get("v.recordId") }); editRecordEvent.fire(); } })
2) Lightning Component which uses lightning:navigation component This can have nooverride=1 applied, but opens the Edit modal with blank context underneath it, rather than on top of the existing context. This means that the user flow is broken (hitting cancel leaves the user on a blank page, hitting save breaks the user flow completely - pictures below (POTENTIAL BUG?))
Component
<aura:component implements="lightning:actionOverride,force:hasRecordId" access="global" > <lightning:Navigation aura:Id="navService" /> <aura:handler name="init" value="{!this}" action="{!c.onInit}"/> </aura:component>
Controller
({ onInit : function(component, event, helper) { /*THIS OPENS THE MODAL IN A BLANK LIGHTNING EXPERIENCE PAGE, RATHER THAN IN THE CONTEXT OF THE CURRENT PAGE*/ var nav = component.find("navService"); var pageReference = { "type": "standard__recordPage", "attributes": { "recordId": component.get("v.recordId"), "actionName": "edit" }, state: { nooverride: '1' } } var URL = nav.navigate(pageReference); } })This leaves the user with a modal over a blank page (the original page context is lost)
If the user cancels, they are left with a blank page
If the user hits save, they page is broken
3) Complete re-development of entire flow This has issues because lightning:recordform does not replicate the detail page layout, so we would need to manually build the edit page and keep it in-line with any page layout changes which we make in the administration interface. This is an unrealistic expectation.
Are we missing the best practice way of creating overrides which can conditionally return users to the "Standard" behaviour? This was possible in Classic but seems to be unavailable in Lightning (despite the documentation implying this should be possible.
- Big Ears
- December 03, 2018
- Like
- 1
- Continue reading or reply
lightning:navigation - navigate to record with inline edit active
We'd like to explore the possibility of a use case whereby the user can navigate to a record and the detail section of the page is in inline-edit mode automatically. We are using lightning:navigation in a lightning Action, but only seem to be able to edit in a modal, or navigate to the full-page view of the record.
I think being able to navigate to the full-page edit would be a better user experience, as the modal can feel cramped for users (or confusing, if you need to edit another record and then finish the user flow on that new record).
Has anybody else managed to meet this use case?
Andy
- Big Ears
- November 28, 2018
- Like
- 0
- Continue reading or reply
lightning:inputfield - lookup fields in Lightning Experience, Salesforce Mobile App and Lightning Out
If so, does anybody know if there are plans to make them work in those environments? There not a danger that Salesforce is making migration pathways to Lightning Experience that much harder for larger organisations with complex/slow migration plans? It seems that the option is either to:
- Develop functionality as both VF pages and Lightning Components so that the use case can work in either environment during the migration
- Develop VF pages to embed in lightning experience (which has all sorts of issues with passing data out of the VF controllers to the pages they’re embedded in, etc.
- Big Ears
- February 26, 2018
- Like
- 0
- Continue reading or reply
"Apex script unhandled trigger exception by user/organization: 005........./00D......." - User Id not one of our users
The issue itself that was causing this error can be fixed, so I'm not too worried about that. However, it would be good to know how to identify this mysterious user/process.
Thanks,
- Big Ears
- February 22, 2018
- Like
- 1
- Continue reading or reply
$User.UIThemeDisplayed not working - Inline VF page in Lightning Record Page
In both cases, the VF page thinks that it is in Salesforce Classic. Is there any chance this is a bug?
- Big Ears
- December 01, 2017
- Like
- 0
- Continue reading or reply
Release notes - Improve the Security of Your Page <Head> Markup
This is probably a stupid question, but just wanted confirmation - There is an upcoming change in Summer '17 relating to LockerService and I just wanted to confirm that it will only impact Lightning Components and not Visualforce pages. Whilst the item is within the LockerService section of the notes, the text doesn't explicitly call out the technology it will impact.
https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_networks_head_markup.htm
With thanks,
Andy
- Big Ears
- February 08, 2017
- Like
- 0
- Continue reading or reply
Visualforce Component Java Error - "...found MethodBindingMethodExpressionAdapter"
I'm trying to pass an instance of a wrapper class into a Component and I'm getting the following error:
Wrong type for attribute <c:ea1_outcomeaction action="com.sun.faces.application.MethodBindingMethodExpressionAdapter@e94c054f">. Expected EA1_OutcomeAction, found MethodBindingMethodExpressionAdapterThe type "EA1_OutcomeAction" is a wrapper class with some attributes and a few methods. However, I've managed to comment almost all of the class out (and all of the contents of the component, with the exception of the attribute) and I'm still getting this error. It seems like a pretty deep Java error. Has anybody else seen this before?
Andy
- Big Ears
- November 15, 2016
- Like
- 0
- Continue reading or reply
Single sign-on with sandboxes using the production org as Identity Provider
- I'm guessing that the URLs would need to changed every time the sandbox is updated?
- Has anybody used user provisioning in a scenario like this? How do you apply profiles/permission sets, etc? Or is it automatically copied over from production?
Andy
- Big Ears
- October 20, 2016
- Like
- 0
- Continue reading or reply
force:recordEdit and force:recordView producing a long error
Code:
<aura:application extends="force:slds"> <force:recordView aura:id="details" recordId="0034E00000Az9OV"/> </aura:application>
Error:
Something has gone wrong. afterRender threw an error in 'layout://rl-Contact-VIEW-FULL-012700000009b4BAAQ---force_highlights-_1-0-554b47494d493539522f4366576866475665533843413d3d.c' [afterRender threw an error in 'markup://aura:expression' [afterRender threw an error in 'markup://force:pageBlock' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:expression' [afterRender threw an error in 'markup://force:pageBlockSectionView' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:expression' [afterRender threw an error in 'markup://force:pageBlockSectionRow' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:expression' [afterRender threw an error in 'markup://force:pageBlockItemView' [afterRender threw an error in 'markup://aura:if' [afterRender threw an error in 'markup://aura:expression' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:if' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://ui:tooltip' [Assertion Failed!: No cmp wrapper has been set : null]]]]]]]]]]]]]]]]]]]] Failing descriptor: {layout://rl-Contact-VIEW-FULL-012700000009b4BAAQ---force_highlights-_1-0-554b47494d493539522f4366576866475665533843413d3d.c}. Please try again.
It looks like the error is in the afterRender, but I'd have no idea how to fix it. I've tried it with different records on different SObjects and with different browsers (Chrome and EDge) and am getting the same error. I'm on Winter '17 version.
Andy
- Big Ears
- October 02, 2016
- Like
- 0
- Continue reading or reply
Mobile Development - SF1 vs. Lightning Experience vs. Classic
We're looking at the various options of using Salesforce mobile (Salesforce1 application, SF1 Browser, Salesforce Classic in the browser) and are finding limitations with each:
Salesforce 1
- Overriding the "View" action on an SObject appears to have no effect at all in SF1 and the standard page is displayed
- The lack of ability to override the Edit action and then return to the normal edit page if the override logic requires it
- If you direct to the full Salesforce classic site in mobile (i.e. switching off the "Enable the Salesforce1 mobile browser app" setting), the UIThemeDisplayed variable still seems to think that the user is in SF1
- With Lightning Experience switched on and "Enable the Salesforce1 mobile browser app" switched off, the user cannot log-in on mobile
- With Lightning Experience switched on and "Enable the Salesforce1 mobile browser app" switched on, the user is directed to SF1, despite Lightning Experience being responsive to different screen sizes, etc.
With thanks,
Andy
- Big Ears
- September 22, 2016
- Like
- 1
- Continue reading or reply
force:recordEdit - How are we supposed to use/style it?
The Lightning Component reference contains a component called "force:recordEdit" which allows the developer to put en edit page for a record in place. However, it is unstyled and ugly. Is there best practice guidance on how/whether it is supposed to be wrapped in particular divs/classes, etc?
If I inspect the individual input fields / labels / markup etc. that gets rendered, I can see that a lot of the usual CSS classes are included, but don't seem to be having an effect on how the field is rendered.
A field in force:recordEdit looks like this:
I'd like it to look like this:
I've tried wrapping it in the SLDS class, but the classes in the force:recordEdit component don't seem to exist in SLDS, so that can't be the right source.
Any help appreciated.
Andy
- Big Ears
- August 24, 2016
- Like
- 0
- Continue reading or reply
Lightning Components - Some Javascript questions
I've been working through the "Lightning Components Basics" Trailhead module and found it to be, in the main, really helpful. However, there are a few points in the examples where methods/techniques are used which aren't clarified and I can't find in the documentation either. I'm trying to work out if these are specific to the Lightning implementation of Javascript, standard Javascript methods or something else that I should read for additional understanding:
- When setting up asyncronous callback responses, there are 2 methods that I can't find in the Lightning documentation or with a Google search, so what are they native to?
- getReturnValue()
- getState()
- When setting up a variable to run an apex method, there are methods which I have a similar issue with:
- setParams()
- In another module, 2 methods in the Helper class for a component call another method within the same Helper class with the "this." nomenclature. Given that these methods are all held in a map, is this a standard Javascript technique or something else?
Thanks!
- Big Ears
- July 19, 2016
- Like
- 0
- Continue reading or reply
Using DISTANCE in a SOQL query - Retrieving and presenting the distance
https://releasenotes.docs.salesforce.com/en-us/spring16/release-notes/rn_api_soql.htm
However, the documentation doesn't seem to indicate how we are supposed to access and retrieve this value from the returned results. It just seems to not be included along with the other columns.
Has anybody else used this functionality? It would be very useful to get my head around it.
Andy
- Big Ears
- June 07, 2016
- Like
- 0
- Continue reading or reply
Query for all users with access to a particular record
Is there a way to reliably return a list of all Users with a particular level of access to a particular record?
- UserRecordAccess looked useful, but the use case seems to be about returning a number of records that pertain to a single user's access
- CustomObject__Share could work, but then this can contain groups (which can be nested) so that can result in multiple queries
Is there a recommended approach?
With thanks, Andy.
- Big Ears
- May 17, 2016
- Like
- 1
- Continue reading or reply
POSSIBLE BUG - Lightning Experience - Edit override with nooverride option
1) Rely on the VF overrides which exist in classic This has numerous issues with navigation on multi-screen overrides (meaningful retURL attributes are not available to the VF page controller, so all button presses would need to be re-developed to handle LEX)
Lightning Component which uses e.force:editRecord event This event can't have "nooverride=1" applied to it, so forces the Browser into an infinite loop, as the edit behaviour gets caught in its own override.
Here is the component controller:
({ onInit : function(component, event, helper) { /*CAUSES INFINITE LOOP IN OVERRIDE CONTEXT*/ var editRecordEvent = $A.get("e.force:editRecord"); editRecordEvent.setParams({ "recordId": component.get("v.recordId") }); editRecordEvent.fire(); } })
2) Lightning Component which uses lightning:navigation component This can have nooverride=1 applied, but opens the Edit modal with blank context underneath it, rather than on top of the existing context. This means that the user flow is broken (hitting cancel leaves the user on a blank page, hitting save breaks the user flow completely - pictures below (POTENTIAL BUG?))
Component
<aura:component implements="lightning:actionOverride,force:hasRecordId" access="global" > <lightning:Navigation aura:Id="navService" /> <aura:handler name="init" value="{!this}" action="{!c.onInit}"/> </aura:component>
Controller
({ onInit : function(component, event, helper) { /*THIS OPENS THE MODAL IN A BLANK LIGHTNING EXPERIENCE PAGE, RATHER THAN IN THE CONTEXT OF THE CURRENT PAGE*/ var nav = component.find("navService"); var pageReference = { "type": "standard__recordPage", "attributes": { "recordId": component.get("v.recordId"), "actionName": "edit" }, state: { nooverride: '1' } } var URL = nav.navigate(pageReference); } })This leaves the user with a modal over a blank page (the original page context is lost)
If the user cancels, they are left with a blank page
If the user hits save, they page is broken
3) Complete re-development of entire flow This has issues because lightning:recordform does not replicate the detail page layout, so we would need to manually build the edit page and keep it in-line with any page layout changes which we make in the administration interface. This is an unrealistic expectation.
Are we missing the best practice way of creating overrides which can conditionally return users to the "Standard" behaviour? This was possible in Classic but seems to be unavailable in Lightning (despite the documentation implying this should be possible.
- Big Ears
- December 03, 2018
- Like
- 1
- Continue reading or reply
"Apex script unhandled trigger exception by user/organization: 005........./00D......." - User Id not one of our users
The issue itself that was causing this error can be fixed, so I'm not too worried about that. However, it would be good to know how to identify this mysterious user/process.
Thanks,
- Big Ears
- February 22, 2018
- Like
- 1
- Continue reading or reply
Mobile Development - SF1 vs. Lightning Experience vs. Classic
We're looking at the various options of using Salesforce mobile (Salesforce1 application, SF1 Browser, Salesforce Classic in the browser) and are finding limitations with each:
Salesforce 1
- Overriding the "View" action on an SObject appears to have no effect at all in SF1 and the standard page is displayed
- The lack of ability to override the Edit action and then return to the normal edit page if the override logic requires it
- If you direct to the full Salesforce classic site in mobile (i.e. switching off the "Enable the Salesforce1 mobile browser app" setting), the UIThemeDisplayed variable still seems to think that the user is in SF1
- With Lightning Experience switched on and "Enable the Salesforce1 mobile browser app" switched off, the user cannot log-in on mobile
- With Lightning Experience switched on and "Enable the Salesforce1 mobile browser app" switched on, the user is directed to SF1, despite Lightning Experience being responsive to different screen sizes, etc.
With thanks,
Andy
- Big Ears
- September 22, 2016
- Like
- 1
- Continue reading or reply
Query for all users with access to a particular record
Is there a way to reliably return a list of all Users with a particular level of access to a particular record?
- UserRecordAccess looked useful, but the use case seems to be about returning a number of records that pertain to a single user's access
- CustomObject__Share could work, but then this can contain groups (which can be nested) so that can result in multiple queries
Is there a recommended approach?
With thanks, Andy.
- Big Ears
- May 17, 2016
- Like
- 1
- Continue reading or reply
Visual Workflow Collections problem - Flow unable to access item variable despite being set
FLOW_ELEMENT_ERROR|The flow failed to access the value for Item.Product_Family_Getter__c because it hasn't been set or assigned.
However, I am definitely setting the field and can see that the flow has it at an earlier point in the debug log:
Building the collection of Opportunity Line Items:
17:27:27.411 (411151510)|FLOW_VALUE_ASSIGNMENT|9831cff0c4b4f94bdd20336c790e146f2a7e2ab-19d3|getDealItems|true 17:27:27.411 (411228209)|FLOW_VALUE_ASSIGNMENT|9831cff0c4b4f94bdd20336c790e146f2a7e2ab-19d3|OpportunityLineItems|[{Name=Crest-ONE Comm- White Teeth ONE Connect, CurrencyIsoCode=USD, Id=00kg0000004G4MeAAK, License__c=Subscription, Product_Family_Getter__c=ONE Connect}] 17:27:27.411 (411251830)|FLOW_BULK_ELEMENT_DETAIL|FlowRecordLookup|getDealItems|1Iterating through the collection
It can be seen that the Item definitely has the field "Product_Family_Getter__c" assigned
17:27:27.411 (411944263)|FLOW_ELEMENT_BEGIN|9831cff0c4b4f94bdd20336c790e146f2a7e2ab-19d3|FlowLoop|Loop_through_Line_Items 17:27:27.412 (412846666)|FLOW_VALUE_ASSIGNMENT|9831cff0c4b4f94bdd20336c790e146f2a7e2ab-19d3|Item|{Name=Crest-ONE Comm- White Teeth ONE Connect, CurrencyIsoCode=USD, Id=00kg0000004G4MeAAK, License__c=Subscription, Product_Family_Getter__c=ONE Connect} 17:27:27.412 (412858987)|FLOW_VALUE_ASSIGNMENT|9831cff0c4b4f94bdd20336c790e146f2a7e2ab-19d3|Loop_through_Line_Items.currentIteration|0
However, I still get this error:
17:27:27.413 (413041600)|FLOW_ELEMENT_BEGIN|9831cff0c4b4f94bdd20336c790e146f2a7e2ab-19d3|FlowDecision|Is_this_a_NOW_Item 17:27:27.414 (414510540)|FLOW_ELEMENT_END|9831cff0c4b4f94bdd20336c790e146f2a7e2ab-19d3|FlowDecision|Is_this_a_NOW_Item 17:27:27.421 (421733197)|FLOW_ELEMENT_ERROR|The flow failed to access the value for Item.Product_Family_Getter__c because it hasn't been set or assigned.||
What else should I be doing? I attach a quick picture of the section of the flow that's failing:
- Big Ears
- July 02, 2014
- Like
- 1
- Continue reading or reply
Sandboxes, Unit testing & NO_MASS_MAIL_PERMISSION
Has anybody found a workaround for this, other than just changing "Email Deliverability" straight back to "All"? Seems like a bit of an oversight by Salesforce here not to excempt test code from those settings.
- Big Ears
- May 30, 2014
- Like
- 2
- Continue reading or reply
Custom Action Publisher - How to refresh the record?
I'm making some changes to my case feed page, so that the Custom Actions can appear in the Publisher. My custom actions are Visualforce pages that used to accept some values and update the record feed and refresh the page. I followed the documentation and used the interaction Javascript library function:
<apex:actionFunction name="emailSent" oncomplete="sforce.interaction.entityFeed.refreshObject('{!feedCase.id}','true','true','true')"/>This javascript function refreshes the fields, related lists and feeds all in one go. However, it doesn't appear to work when the Custom Action is being invoked from the Publisher. Simply, nothing happens.
I have found this Javascript function from the Canvas Javascript library which seems to work, but doesn't do what I want it to:
<apex:actionFunction name="emailSent" oncomplete="Sfdc.canvas.publisher.publish({name : 'publisher.refresh', payload : {feed:true}});"/>This function refreshes the feed, but not the fields or related lists. As a result, the highlights panel at the top of the page doesn't update, either, which my users look to as an indicator that the record has been updated. They shouldn't have to force a refresh of the page to check.
I can't find anything in the documentation that lists the elements I can put into the payload, so I'm not sure what the situation is:
- The Initial Code sample should have continued to work in the Custom Action Publisher, keep debugging to find out why it didn't.
- The Initial Code sample doesn't work in the Custom Action Publisher. However, the new code sample can be used to refresh more than the feed.
- The initial Code sample doesn't work in the Custom Action Publish and the new code sample can only refresh the feed. Find another way to refresh the fields and related lists
- Big Ears
- May 24, 2014
- Like
- 1
- Continue reading or reply
Console Integration Toolkit - IsInConsole() doesn't always know that it's in the console....
I have an inline visualforce page on a record with a command button. The command button takes some actions on the controller and then refreshes the record. This page was originally created by another developer and we've since moved to using the Service Console (but not for all users).
The command button took some action on the controller side to update the record and then conditionally rendered an output panel at the top of the page which prompted a refresh of the whole record. If the user is in the service console, this doesn't work correctly and the user is exited from the service console.
I'd like the command button to refresh the record when the user is in the service console, but I'm falling at the first hurdle. The IsInConsole() function from the console integration toolkit seems to think that the record isn't being displayed within the console when the commandButton is clicked:
<apex:page standardController="XXXX" extensions="XXXX"> <apex:includeScript value="/support/console/30.0/integration.js"/> <apex:outputPanel rendered="{!refreshPage}"> <script type="text/javascript"> if (sforce.console.isInConsole()) { alert("in console"); **SOME JAVASCRIPT TO REFRESH THE TAB** } else { alert("not in console"); window.top.location = '/{!Tenancy__c.id}'; } </script> </apex:outputPanel> <apex:form id="featuresForm"> <apex:pageBlock > <script> if (sforce.console.isInConsole()) { alert("in console"); } else { alert("not in console"); } </script> <apex:pageMessages /> <apex:pageBlockButtons > <!--<apex:commandButton value="Save" action="{!save}" rendered="{!Tenancy__c.LockFeatures__c}"/>--> </apex:pageBlockButtons> ***MORE VF PAGE HERE***
I've put in place some "debugging" javascript which confirms that ehen the page first loads, the alert pops up with the "In Console" message. So I know the toolkit is working and properly invoked when the record is first loaded up. However, when the "CommandButton" is clicked and the inline VF page refreshes, the alert that pops up, then says "not in console".
Has anybody seen this before and know why the toolkit may not recognise the console?
Alternatively - Feel free to suggest ways to re-engineer the page so that the refresh will work in both the console and non-console view. We do need the refresh, so that new information is displayed to the user, otherwise I could just get away with an inline refresh of the VF page.
With thanks,
- Big Ears
- April 28, 2014
- Like
- 1
- Continue reading or reply
Unable to set some fields in field sets as required
However, the admin interface won't let me set some of the fields to "required" within the field set. These aren't all the same type of field (some are drop-downs, others are not) and in some cases, the same field in different fields sets can be set to "Required" in one and not the other.
Does anybody have any idea what could cause this?
- Big Ears
- January 17, 2014
- Like
- 1
- Continue reading or reply
lightning-record-form - render with sections
- Big Ears
- May 21, 2019
- Like
- 0
- Continue reading or reply
Ability to remove action overrides in Lightning whilst leaving them in place in Classic
Remove Overrides for Standard Buttons and Tab Home Pages (https://help.salesforce.com/articleView?id=links_customize_override_remove.htm&type=5)
However, step 3 describes options which not available within our org:
"Select No override (default behavior) for the experience whose override you want to remove (Salesforce Classic, Lightning Experience, or mobile)."
We've had a case open with Salesforce for a few weeks now and I can't seem to make any headway (they say the documentation team say that their documentation is correct, but also can't explain why I don't see the options that the documentation says should be there)
Being able to switch off the override in LEX would be ideal.
As we're in Lightning Console, using Lightning Components to override the override behaviour specifically for LEX still results in unwanted behaviours (tabs being opened unnecessarily, no access to inline editing, etc.) The only option remaining to us may be to have to re-build an object model specifically for LEX, which I'm sure isn't the desired approach when migrating to LEX
Is anybody able to confirm which is the expected behaviour and best practice for dealing with it?
- Big Ears
- May 10, 2019
- Like
- 0
- Continue reading or reply
lightning:navigation - navigate to record with inline edit active
We'd like to explore the possibility of a use case whereby the user can navigate to a record and the detail section of the page is in inline-edit mode automatically. We are using lightning:navigation in a lightning Action, but only seem to be able to edit in a modal, or navigate to the full-page view of the record.
I think being able to navigate to the full-page edit would be a better user experience, as the modal can feel cramped for users (or confusing, if you need to edit another record and then finish the user flow on that new record).
Has anybody else managed to meet this use case?
Andy
- Big Ears
- November 28, 2018
- Like
- 0
- Continue reading or reply
MyDomain URL Critical Update Breaks all VisualForce pages?
When the new Critical Update is activated in our Sandbox organization, we get the following error on every non-managed visualforce page:
<DomainName>--c.visualforce.com's server IP address could not be found.
We left it overnight in case it was an issue with the DNS not being updated, but that doesn't seem to be the case. Deactivating the update restores all functionality. Does something else need to be updated in order to get our non-managed pages working?
Thank you.
- Luke Osmundson 2
- May 02, 2018
- Like
- 0
- Continue reading or reply
lightning:inputfield - lookup fields in Lightning Experience, Salesforce Mobile App and Lightning Out
If so, does anybody know if there are plans to make them work in those environments? There not a danger that Salesforce is making migration pathways to Lightning Experience that much harder for larger organisations with complex/slow migration plans? It seems that the option is either to:
- Develop functionality as both VF pages and Lightning Components so that the use case can work in either environment during the migration
- Develop VF pages to embed in lightning experience (which has all sorts of issues with passing data out of the VF controllers to the pages they’re embedded in, etc.
- Big Ears
- February 26, 2018
- Like
- 0
- Continue reading or reply
Visualforce Page Links Fail When Critical Update Activated
DANGER! DANGER! DO NOT ACTIVATE!
This changes links for visualforce pages. <domain name>.visualforce.com replaces <domain name>.<instancename>.visual.force.com.
For whatever reason, this does not work with Visualforce tabs or with buttons that link to visualforce pages.
With the critical update deactivated, the link for visualforce tab is https://<domain name>.<instancename>.visual.force.com/apex/TimeEntryCalendar?sfdc.tabName=01r500000003bNn.
When the critical update is activated, the link for the visualforce tab is https://<domain name>.visualforce.com/apex/TimeEntryCalendar?sfdc.tabName=01r500000003bNn.
The problem is that clicking the "activated" link yields this:
<domain name>.visualforce.com’s server IP address could not be found.
In my case, it was a really big problem because the visualforce tab was the default home page. So activating the Critical Update essentially locked all of my users out of salesforce.com.
This also fails with a simple button link to a visual force page.
If you assign a url to a button or type the link in - /apex/TimeEntryCalendar for instance, it works fine when the update is deactivated.
But activate the update, and it fails on just the simple link.
Problem exists in both Classic and Lightning.
MAJOR SNAFU!
- Claiborne
- February 16, 2018
- Like
- 2
- Continue reading or reply
$User.UIThemeDisplayed not working - Inline VF page in Lightning Record Page
In both cases, the VF page thinks that it is in Salesforce Classic. Is there any chance this is a bug?
- Big Ears
- December 01, 2017
- Like
- 0
- Continue reading or reply
can some on eplease tell me what is issue with this query ??
it is saying "unknow error parsing query"
- Arjun Accenture
- December 01, 2017
- Like
- 0
- Continue reading or reply
Visualforce Component Java Error - "...found MethodBindingMethodExpressionAdapter"
I'm trying to pass an instance of a wrapper class into a Component and I'm getting the following error:
Wrong type for attribute <c:ea1_outcomeaction action="com.sun.faces.application.MethodBindingMethodExpressionAdapter@e94c054f">. Expected EA1_OutcomeAction, found MethodBindingMethodExpressionAdapterThe type "EA1_OutcomeAction" is a wrapper class with some attributes and a few methods. However, I've managed to comment almost all of the class out (and all of the contents of the component, with the exception of the attribute) and I'm still getting this error. It seems like a pretty deep Java error. Has anybody else seen this before?
Andy
- Big Ears
- November 15, 2016
- Like
- 0
- Continue reading or reply
force:recordEdit and force:recordView producing a long error
Code:
<aura:application extends="force:slds"> <force:recordView aura:id="details" recordId="0034E00000Az9OV"/> </aura:application>
Error:
Something has gone wrong. afterRender threw an error in 'layout://rl-Contact-VIEW-FULL-012700000009b4BAAQ---force_highlights-_1-0-554b47494d493539522f4366576866475665533843413d3d.c' [afterRender threw an error in 'markup://aura:expression' [afterRender threw an error in 'markup://force:pageBlock' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:expression' [afterRender threw an error in 'markup://force:pageBlockSectionView' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:expression' [afterRender threw an error in 'markup://force:pageBlockSectionRow' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:expression' [afterRender threw an error in 'markup://force:pageBlockItemView' [afterRender threw an error in 'markup://aura:if' [afterRender threw an error in 'markup://aura:expression' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://aura:if' [afterRender threw an error in 'markup://aura:html' [afterRender threw an error in 'markup://ui:tooltip' [Assertion Failed!: No cmp wrapper has been set : null]]]]]]]]]]]]]]]]]]]] Failing descriptor: {layout://rl-Contact-VIEW-FULL-012700000009b4BAAQ---force_highlights-_1-0-554b47494d493539522f4366576866475665533843413d3d.c}. Please try again.
It looks like the error is in the afterRender, but I'd have no idea how to fix it. I've tried it with different records on different SObjects and with different browsers (Chrome and EDge) and am getting the same error. I'm on Winter '17 version.
Andy
- Big Ears
- October 02, 2016
- Like
- 0
- Continue reading or reply
Attribute type sObject failed to read after Summer'16 update
The reason is sObject attribute and its fields not accessible as before.
Here is my attribute and inputReachText component with binded field of Idea:
<aura:attribute name="newIdea" type="Idea" default="{'sObjectType':'Idea', 'Body':''}" /> <ui:inputRichText aura:id="ideaBodyText" value="{!v.newIdea.Body}" label="Description" />And here is controller code after change the body field and click save:
console.log(cmp.get('v.newIdea')); //= {sObjectType:'Idea', Body:''} - Body is empty console.log(cmp.get('v.newIdea.Body')); //= TEST BODYAnd when trying to send the object to Apex controller method it says 'Unable to read SObject'.
Did anybody face with something similar?
- Aleksey Sheldagaev
- June 13, 2016
- Like
- 0
- Continue reading or reply
Potential Bug report: Using site.validatePassword in a test class
Just wanted to submit this here, to see if others have experience it to. If I'm running an Apex test and the code hits site.validatePassword, I get the following error:
System.UnexpectedException: Salesforce System Error: 2089153553-377506 (-1123129540) (-1123129540)I've got a work-around in place, but wanted to see if anybody else is dealing with it. It would be good to get it fixed, as the workaround is costing me code coverage
Andy
- Big Ears
- April 26, 2016
- Like
- 0
- Continue reading or reply
How can I identify the record for which the approval process failed
Sample Code:
Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
req.setComments('Approval Comments');
req.setObjectId(<Record ID>);
LApproval.ProcessResult result = Approval.process(req, false);
System.debug(result);
So how can we identify those records for which the approval process fails?
- Creatobug
- October 18, 2015
- Like
- 0
- Continue reading or reply
How to set CreatedById and CreatedDate for test class records?
I need to write a test class for a trigger that heavily involves the CreatedById and CreatedDate of a task. I can't input values for these fields in a test class, since they're not writeable.
How can I set the CreatedById and CreatedDate for the insertion of a task record in a test class?
Thanks!
-Greg
- ChickenOrBeef
- September 25, 2014
- Like
- 0
- Continue reading or reply
Inline visualforce Pages - Causing new tabs to open
In our org, we have a few managed packages with inline VF pages on record pages. We've also created one inline VF page ourselves. I'm finding that, occasionally, when opening a new record, the inline visualforce page will open in a new tab, instead.
I've confirmed with the package providers that this shouldn't be happening (there's nothing in the pages that would be causing a tab to open). My users haven't complained to me that they've been seeing this, so it might be my local machine (I kind of hope it is), but has anybody else experienced this and do they know what caused it?
Thanks!
Andy
- Big Ears
- April 15, 2014
- Like
- 0
- Continue reading or reply
Opportunity Product schedule reports - Schedule Quantity & Schedule Amount on seperate rows
I was wondering if anybody has found this issue?
I'm finding that, unless each individual Opportunity Product is edited and re-saved, they show up in reports on two seperate lines, one row for the Schedule Amount (with Schedule Quantity zeroed) and vice versa.
This is causing a headache for the finance team, who're using reports from Salesforce.
Andy
- Big Ears
- June 10, 2009
- Like
- 0
- Continue reading or reply
BEST PRACTICE
When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.
That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it.
- Steve :-/
- February 10, 2010
- Like
- 131
- Continue reading or reply