• Brian11
  • NEWBIE
  • 25 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 19
    Questions
  • 12
    Replies
Hey is it possbile to open a modal when a contact is clicked and lands on the record page base on a condition?

What i want is the following:
When a contact goes to their record page. A flow/process or manual lightning component checks if the user has all data required. If not it will have to fire an apex method to generate all objects and all data required.

Is it possible or a work around for allowing organizations who install our manage package to add or remove utility bar items in a manage package?
Is it possible to fire only some triggers when you create a batch task?

I'm running into a problem where a batch task performs and because one of my triggers uses. It doesnt fire but I need that trigger to fire.

if(!System.isBatch()){
}
We were wondering whether ISV Apps' custom fields on standard objects would count against the org limits of organizations that download our application. Most of the sources we found online seem to indicate that our custom fields will not count. However, I read this Salesforce help article and it specifically says 
if the package uses other types of custom components, such as custom fields, they count against the relevant limits of your Salesforce edition.

https://help.salesforce.com/articleView?id=faq_distribution_installing_why_do_the_custom.htm&type=0

Is there a good practice for dealing with such problem?
 

Hi
I've created a connected app and try to follow the circle ci implementations on the sample gallery projects: https://trailhead.salesforce.com/sample-gallery

When circle ci runs the following code it returns an error. I'm not sure why and how to avoid it.
 

node_modules/sfdx-cli/bin/run force:auth:jwt:grant --clientid $CONSUMERKEY_PRERELEASE --jwtkeyfile assets/server.key --username $USERNAME_PRERELEASE --setdefaultdevhubusername -a HubOrg


ERROR: This session is not valid for use with the REST API.

Does anyone has a solution for this
Can you share some examples and best practices? Some Libraries and overall experience doing css animations in lightning components.
Hello,

For some reason selected rows on the datatable component is not working this is what I currently have. the selectedrows are being created when the component renders. my init function. I've hard coded it here thinking it would work. Any Advice?

Component
<aura:attribute name="selectedRows" type="List" default="['a020m000001Uq00AAC']"


<lightning:datatable columns="{! v.headerFields }" data="{! v.data }" keyField="Id" showRowNumberColumn="false" resizeColumnDisabled="true" selectedRows="{!v.selectedRows }" />

 
I am firing a  quick actions using the actionApi from a lighting component. The action fires but I dont have access to a callback so that I can execute other functions to refresh my component.

The console.log below fires when the quickAction modal is open. It is not after it is closed. Does anyone have a workaround?
 
actionAPI.selectAction(args).then(function (result) {
            var fields = result.targetableFields;
            console.log("im here", fields)
        }).catch(function (e) {
            if (e.errors) {
                //If the specified action isn't found on the page, show an error message in the my component 
            }
 });

 
Does anyone have any good resource or example for managing multiple manage packages. I am building an app and I want to implement a modular package design. So idealy each package is dependent of each other but uninstalling packages wont break the app. Which allows for more flexibility. I would love to chat with anyone who already implemented this concept. 
  • September 27, 2018
  • Like
  • 0
I have an angular application using salesforce to save data and allowing users to Authenticate. I am currently building a salesforce lightning application and I want to be able to use SSO to seemlessly log into the angular application without out having to authenticate.

If this is possible can you point me into the right direction with materials or examples that I can reference. Its a new concept for me.
  • September 24, 2018
  • Like
  • 0

When I resize the browser window to a larger size the lightning Datatable expands to fill the extra space. Which is working correctly

When I resize the browser window to a smaller size the lightning Datatable does not adjusts to fit the new screen size. It remains at its larger size causing the recordpage to have a horizontal scroll.

Is there a fix around this? I am using the following component:
https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example

  • September 21, 2018
  • Like
  • 0
Any functions on the client side controller work without a problem but If i have to make a call to an apex server The function doesnt exists.
Is this a behavior that is not allowed?
 
public with sharing class ContactRecordHomeController {
    
    @AuraEnabled
    public static String updateStatus() {
         User user = [Select sidebar_Status__c From User Where Id = :UserInfo.getUserId()];
         user.sidebar_Status__c = !user.sidebar_Status__c;
         update user;
        return 'user';
    }

}

 
  • September 20, 2018
  • Like
  • 0

Hi,

I am using Utility BarAPI and I have the following component below openining when a button is clicked.

These Are the following implements on the Component 

implements="flexipage:availableForAllPageTypes,force:hasRecordId"

To my understanding force:hasRecordId will give you the following variable (recordId) allowing you to know which contact your on.

When I run the code below recordId for some reason its null.  I think its because doInit fires before the component is render so it has no recall of what recordId is. Since This component is hidden inside a utilitybar.  Is there a way around this?

<aura:handler name="init" value="{!this}" action="{!c.doInit}" />

let contactId = component.get("v.recordId");
console.log(contactId) => null
  • September 12, 2018
  • Like
  • 0
I recently Used this in my Apex Class and I ran into a weird problem.

From my lightning controller I send the following data as a string format using JSON.Stringify
{ 
 item: "4",
 change:  "40",
 limit: "400"
}

On my apex Class controller I used JSON.deserializeUntyped() to map it to an object
Map<String, Object> listJson = (Map<String, Object>) JSON.deserializeUntyped(stringList);

I wasnt working at all Until I wrapped the data coming from the lightning controller in an object so when I did the following then the JSON.deserializeUntyped() worked perfectly. 
 
{
 data:  { 
  item: "4",
  change:  "40",
  limit: "400"
 }
}

Can someone explain why this is necessary. Or is there a solution that better

 
Today I created a custom tab and added a ListView Standard component and used its standard filters.
I updated the package version and it worked correctly but when i try to install the package in the sandbox. It threw the following error: 

Component [flexipage:filterListCard] attribute [filterName]: Error retrieving filter [TodaysTasks] for entity [Task]

Not sure why this is happening being that its a salesforce standard
This is the error that I currently get

ERROR:  Target object does not have a valid lookup or master-detail reference to the parent object.

Is there a way to get a much more detail error?
I've created different recordtype and the page layouts assigned to those record types are not being pulled by sfdx. Any field arrangments that I do on the pagelayout are getting deleted when I create a new scratch org. Has anyone found a solution to this?

I am trying to use a button inside a lightning component to open a global action. Is this possible?
 

Ultimately the behavior I am looking for is the slide up from bottom left that a global action has. I cant find anything in the docs that has this feature. I keep running into quickAction api and the utility Api.

 

<aura:component implements="force:appHostable, flexipage:availableForAllPageTypes, flexipage:availableForRecordHome, force:hasRecordId" access="global">

  <lightning:quickActionAPI aura:id="quickActionAPI" />

      <lightning:button label="Select Update Case Action" onclick="{!c.fireGlobal}" />


</aura:component>

// Controller
fireGlobal: function (cmp, event, helper) {
    var actionAPI = cmp.find("quickActionAPI");
   // New Contact is a global action
    var args = { actionName: "NewContact" };
    actionAPI.invokeAction(args);
}

I am trying to use a button inside a lightning component to open a global action. Is this possible?
 

Ultimately the behavior I am looking for is the slide up from bottom left that a global action has. I cant find anything in the docs that has this feature. I keep running into quickAction api and the utility Api.

 

<aura:component implements="force:appHostable, flexipage:availableForAllPageTypes, flexipage:availableForRecordHome, force:hasRecordId" access="global">

  <lightning:quickActionAPI aura:id="quickActionAPI" />

      <lightning:button label="Select Update Case Action" onclick="{!c.fireGlobal}" />


</aura:component>

// Controller
fireGlobal: function (cmp, event, helper) {
    var actionAPI = cmp.find("quickActionAPI");
   // New Contact is a global action
    var args = { actionName: "NewContact" };
    actionAPI.invokeAction(args);
}
We were wondering whether ISV Apps' custom fields on standard objects would count against the org limits of organizations that download our application. Most of the sources we found online seem to indicate that our custom fields will not count. However, I read this Salesforce help article and it specifically says 
if the package uses other types of custom components, such as custom fields, they count against the relevant limits of your Salesforce edition.

https://help.salesforce.com/articleView?id=faq_distribution_installing_why_do_the_custom.htm&type=0

Is there a good practice for dealing with such problem?
 

Hi
I've created a connected app and try to follow the circle ci implementations on the sample gallery projects: https://trailhead.salesforce.com/sample-gallery

When circle ci runs the following code it returns an error. I'm not sure why and how to avoid it.
 

node_modules/sfdx-cli/bin/run force:auth:jwt:grant --clientid $CONSUMERKEY_PRERELEASE --jwtkeyfile assets/server.key --username $USERNAME_PRERELEASE --setdefaultdevhubusername -a HubOrg


ERROR: This session is not valid for use with the REST API.

Does anyone has a solution for this
Hello,

For some reason selected rows on the datatable component is not working this is what I currently have. the selectedrows are being created when the component renders. my init function. I've hard coded it here thinking it would work. Any Advice?

Component
<aura:attribute name="selectedRows" type="List" default="['a020m000001Uq00AAC']"


<lightning:datatable columns="{! v.headerFields }" data="{! v.data }" keyField="Id" showRowNumberColumn="false" resizeColumnDisabled="true" selectedRows="{!v.selectedRows }" />

 
I have an angular application using salesforce to save data and allowing users to Authenticate. I am currently building a salesforce lightning application and I want to be able to use SSO to seemlessly log into the angular application without out having to authenticate.

If this is possible can you point me into the right direction with materials or examples that I can reference. Its a new concept for me.
  • September 24, 2018
  • Like
  • 0

When I resize the browser window to a larger size the lightning Datatable expands to fill the extra space. Which is working correctly

When I resize the browser window to a smaller size the lightning Datatable does not adjusts to fit the new screen size. It remains at its larger size causing the recordpage to have a horizontal scroll.

Is there a fix around this? I am using the following component:
https://developer.salesforce.com/docs/component-library/bundle/lightning:datatable/example

  • September 21, 2018
  • Like
  • 0
Any functions on the client side controller work without a problem but If i have to make a call to an apex server The function doesnt exists.
Is this a behavior that is not allowed?
 
public with sharing class ContactRecordHomeController {
    
    @AuraEnabled
    public static String updateStatus() {
         User user = [Select sidebar_Status__c From User Where Id = :UserInfo.getUserId()];
         user.sidebar_Status__c = !user.sidebar_Status__c;
         update user;
        return 'user';
    }

}

 
  • September 20, 2018
  • Like
  • 0
Today I created a custom tab and added a ListView Standard component and used its standard filters.
I updated the package version and it worked correctly but when i try to install the package in the sandbox. It threw the following error: 

Component [flexipage:filterListCard] attribute [filterName]: Error retrieving filter [TodaysTasks] for entity [Task]

Not sure why this is happening being that its a salesforce standard
This is the error that I currently get

ERROR:  Target object does not have a valid lookup or master-detail reference to the parent object.

Is there a way to get a much more detail error?
I've created different recordtype and the page layouts assigned to those record types are not being pulled by sfdx. Any field arrangments that I do on the pagelayout are getting deleted when I create a new scratch org. Has anyone found a solution to this?

I am trying to use a button inside a lightning component to open a global action. Is this possible?
 

Ultimately the behavior I am looking for is the slide up from bottom left that a global action has. I cant find anything in the docs that has this feature. I keep running into quickAction api and the utility Api.

 

<aura:component implements="force:appHostable, flexipage:availableForAllPageTypes, flexipage:availableForRecordHome, force:hasRecordId" access="global">

  <lightning:quickActionAPI aura:id="quickActionAPI" />

      <lightning:button label="Select Update Case Action" onclick="{!c.fireGlobal}" />


</aura:component>

// Controller
fireGlobal: function (cmp, event, helper) {
    var actionAPI = cmp.find("quickActionAPI");
   // New Contact is a global action
    var args = { actionName: "NewContact" };
    actionAPI.invokeAction(args);
}
Hi ,

I am unable write code cover for the below else condition because of Test.isRunningTest(), In every time if condition is executed, but else is not executing. help me on this. 

if ((Name__c != null && Cheque_Number__c != null && Branch__c != null ) || Test.isRunningTest()) {
errMsg = 'Name existing in database';
} else {
errMsg='';
}

Thanks in Advance

Regards,
raju