• Nathan E.
  • NEWBIE
  • 0 Points
  • Member since 2018
  • Architect


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 8
    Likes Given
  • 0
    Questions
  • 3
    Replies
I enabled multiple accounts on contacts. It created a related list called "Related Accounts" and I need the name to plug in some triggers. A selection statement for child relationships on Contact  didn't work.
Hi,
I have a new profile and I need to use to around 200 Users but these are all with Force.com - App Subscription. I think we need to make Active=false and FederatonId is null, how can we do it for 200 users ? is it possible with dataloader? how can we do iti?

Here's what I've been staring at for 16 minutes so far. 

User-added image

Deployed via SFDX, specifying a single apex test to run, which has less than 40 lines of code. Takes only a fraction of a second to run in scratch org or sandbox.

But when I deploy to Production, all components are validated within a minute or two, then the status switches to 'Running {testname}'.... and stays that way. For literally 15 minutes or more. Before the test is even started. 

I'm not finding a lot of posts on this issue. Plenty of people talking about the time it takes to actually run the test. But I'm talking about the time it takes to start running the tests. This isn't a one time thing, but it also isn't consistent. Sometimes the tests will begin running pretty much immediately. Sometimes I'll end up cancelling and redeploying because a 30 minute delay to START testing seems ridiculous even given Salesforce's standards. And when I do cancel and redeploy? Good chance it'll take a fifth of the time, for no apparent reason.

What I'd really like is some better communication during this process. Why is my test run delayed? What was prioritized ahead of it? How can I anticipate deployment times so it's not a complete crapshoot regardless of build size? 

I enabled multiple accounts on contacts. It created a related list called "Related Accounts" and I need the name to plug in some triggers. A selection statement for child relationships on Contact  didn't work.
I am adding a button that opens a modal window to add a task to a specific "Objective".  There is an add Task button next to every "Objective" that is displayed, but I'm not sure how I can pull the record Id of the specific objective the button sits next to so I can set the WhatId field of the task to that specific objective... Any ideas here? 

Thanks in advance.
 
<aura:iteration items="{!v.objectives}" var="obj" >


        	<div class="blacklink slds-col slds-size_11-of-12 slds-text-body_regular slds-m-bottom_small slds-box">
                	<a class ="blacklink" href="{!'/lightning/r/Task/'+ obj.Id + '/view'}" target="_blank">	{!obj.Description__c} </a>
            </div>
            <div id ="obj.Id" class="slds-size_1-of-12 slds-m-top_x-small slds-p-left_large">
                	<lightning:button label="+Task" class="slds-button slds-text-body_regular" onclick="{!c.taskopenmodal}" name="obj.Id"/>
                
			</div>
            
            	
                        <aura:if isTrue="{!obj.Tasks}">
                    	<div class="slds-col slds-size_3-of-5 slds-p-left_xx-large slds-m-bottom_small slds-text-heading_small slds-border_bottom" >
                            Task Subject
						</div>
                		<div class="slds-col slds-size_1-of-5 slds-m-bottom_small slds-text-heading_small slds-border_bottom">
                			Status
                		</div>
                		<div class="slds-col slds-size_1-of-5 slds-m-bottom_small slds-text-heading_small slds-border_bottom">
                			Owner
                		</div>
          				</aura:if>
                    
            <aura:iteration items="{!obj.Tasks}" var="t" >
                       	<div class="slds-col slds-size_3-of-5 slds-p-left_xx-large slds-m-bottom_small" >
                            <a href="{!'/lightning/r/Task/'+ t.Id + '/view'}" target="_blank">
                            {!t.Subject} 
                            </a>
						</div>
                		<div class="slds-col slds-size_1-of-5 slds-m-bottom_small">
                			{!t.Status}
                		</div>
                		<div class="slds-col slds-size_1-of-5 slds-m-bottom_small">
                			{!t.Owner.Name}
                		</div>
            </aura:iteration> 
            
         </aura:iteration>

 
How do I give my radio buttons a value that has already been detarmined in a picklist?
User-added image
Example if I choose "Male" in my picklist I would like the "Male" radio button to be selected on my VF page.


Also,
<div class="slds-size_2-of-8">
                                <div class="slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small">
                                    <div class="slds-form-element__control">
                                        <label class="slds-form-element__label" for="form-element-02">
                                            <b>
                                                Are You British Citizen?:-
                                            </b>
                                        </label>
                                        <span class="slds-radio">
                                            <input type="radio" id="radio-3" value="radio-" name="YesNo" />
                                            <label class="slds-radio__label" for="radio-3">
                                                <span class="slds-radio_faux">
                                                </span>
                                                <span class="slds-form-element__label">
                                                    Yes
                                                </span>
                                            </label>
                                        </span>
                                        <span class="slds-radio">
                                            <input type="radio" id="radio-4" value="radio-4" name="YesNo" />
                                            <label class="slds-radio__label" for="radio-4">
                                                <span class="slds-radio_faux">
                                                </span>
                                                <span class="slds-form-element__label">
                                                    No
                                                </span>
                                            </label>
                                        </span>
                                    </div>
                                    {! Apprentice__c.British_Citizen__c}
                                </div>
                            </div>

how do I use a checkbox with a value of TRUE & FALSE and convert it into a radio button saying yes and no?
User-added image
 
<div class="slds-size_2-of-8">
                                <div class="slds-box slds-box_x-small slds-text-align_center slds-m-around_x-small">
                                    <div class="slds-form-element__control">
                                        <label class="slds-form-element__label" for="form-element-01">
                                            <b>
                                                Gender
                                            </b>
                                        </label>
                                        <span class="slds-radio">
                                            <input type="radio" id="radio-1" value="{! Apprentice__c.Gender__c}" name="MaleFemale"/>
                                            <label class="slds-radio__label" for="radio-1">
                                                <span class="slds-radio_faux">
                                                </span>
                                                <span class="slds-form-element__label">
                                                    Male
                                                </span>
                                            </label>
                                        </span>
                                        <span class="slds-radio">
                                            <input type="radio" id="radio-2" value="{! Apprentice__c.Gender__c}" name="MaleFemale" />
                                            <label class="slds-radio__label" for="radio-2">
                                                <span class="slds-radio_faux">
                                                </span>
                                                <span class="slds-form-element__label">
                                                    Female
                                                </span>
                                            </label>
                                        </span>
                                    </div>
                                </div>
                            </div>

Thanks Dan
What attribute do we map a photo from active directory to populate a user's profile photo with Identity Connect?
I have a wrapper class that is being called by a sfdc lightning component.  For some reason I am not able to access all the values of the class once it is passed.  They are seem to be set in the controller but the lightning controller does not access all of them.  Does anyone know what I am doing wrong.  My code is below.  I did remove some code for brevity.

Controller
@auraEnabled
         public static List<activityWrapper> getAllActivities() {
                     Id usrId = UserInfo.getUserId();
                     List<activityWrapper> allAct = new List<activityWrapper>();
                     dateTime startDate = system.now().addDays(-180);
                         dateTime endDate = system.now().addDays(180);
           List<Id> eventRelationIds = new List<Id>();
                     List<Id> contactIds = new List<Id>();
                      List<Id> accountIds = new List<Id>();
             List<eventRelation> evtRel = [select eventId, relationId, AccountId from eventRelation where event.Owner.id = :usrId and isInvitee = false and event.StartDateTime >= :startDate AND event.StartDateTime <= :endDate order by event.StartDateTime asc ];
             for(eventRelation ev: evtRel) {
               eventRelationIds.add(ev.eventId);
                             contactIds.add(ev.relationId);
                             accountIds.add(ev.AccountId);
             }
           List<Event> eventList = [SELECT Id, Activity_Type__c,recordType.name, whoId, EventWhoIds,  Subject, Short_Description__c, StartDateTime, Description, Activity_Status__c, Owner.Name,  Financial_Account__c, ActivityRelation__c, endDateTime, activityDate FROM event  WHERE Owner.id = :usrId and StartDateTime >= :startDate AND StartDateTime <= :endDate  order by startDateTime asc];
                     List<Contact> contList =[Select Id, Email, MailingCity, MailingStreet, MailingState, MailingCountry, MailingPostalCode, Phone, Account.Name, Name, AccountId from Contact where Id in :contactIds];
                     List<Contact> accContacts = [Select Id, Name, Phone, Email from Contact where AccountId in :accountIds];
                     for(event e: eventList){
                         for(contact c: contList){
                             if(e.whoId == c.Id){
                                string contName = c.Name;
                                  string accName = c.Account.Name;
                               string actStatus = e.Activity_Status__c;
                                  Id accId = c.AccountId;
                              string sub = e.Subject;
                                 string actType = e.Activity_Type__c;
                              Id contId = c.Id;
                                 string descr = e.Description;
                              string phone = c.Phone;
                                 string email = c.Email;
                               date actDate = e.ActivityDate;
                              datetime stDate = e.StartDateTime;
                                datetime eDate = e.EndDateTime;
                                id  eId = e.Id;
                                string actStreet = c.MailingStreet;
                                string  actCity = c.MailingCity;
                                string  actState = c.MailingState;
                                string  actZip = c.MailingPostalCode;
                                string  actCountry = c.MailingCountry;
                                string  actMultiPerson = '';
                                 if(e.EventWhoIds.size() > 1){
                                     actMultiPerson = ' +';
                             }
                                  allAct.add(new activityWrapper(contName, accName, actStatus, accId, sub, actType, contId, descr, phone, email,  actDate, stDate, eDate, eId, actStreet, actCity, actState, actZip, actCountry, actMultiPerson));
                             }
                         }
                     }
                     return allAct;
         }

                 public class activityWrapper{
                    @AuraEnabled public string actContact {get; set;}
                    @AuraEnabled public string actAcc {get; set;}
                    @AuraEnabled public string actStatus {get; set;}
                    @AuraEnabled public id actAccId {get; set;}
                    @AuraEnabled public string actSubject {get; set;}
                    @AuraEnabled public string actType {get; set;}
                    @AuraEnabled public id actContId {get; set;}
                    @AuraEnabled public string actDesc {get; set;}
                    @AuraEnabled public string actPhone {get; set;}
                    @AuraEnabled public string actEmail {get; set;}
                    @AuraEnabled public date actDate {get; set;}
                    @AuraEnabled public dateTime actStDate {get; set;}
                    @AuraEnabled public dateTime actEndDate {get; set;}
          @AuraEnabled public Id actId {get; set;}
                    @AuraEnabled public string actStreet {get; set;}
                    @AuraEnabled public string actCity {get; set;}
                    @AuraEnabled public string actState {get; set;}
                    @AuraEnabled public string actzip {get; set;}
                    @AuraEnabled public string actCountry {get; set;}
                    @AuraEnabled public string actMultiPerson {get; set;}
              public activityWrapper( string contName, string accName, string actStatus, Id accId, string sub, string actType, Id contId, string descr, string phone, string email,  date actDate, datetime stDate,datetime eDate,id  eId,string actStreet,string  actCity,string  actState, string  actZip,string  actCountry,string  actMultiPerson){
                                actContact = contName;
                                actAcc = accName;
                                actStatus =  actStatus;
                                system.debug('*** actStatus2 is '+actStatus);
                                actAccId = accId;
                                actSubject =  sub;
                                actType = actType;
                                actContId = contId;
                                actDesc = descr;
                                actPhone = phone;
                                actEmail = email;
                                actDate = actDate;
                                actStDate = stDate;
                                actEndDate = eDate;
                                actId = eId;
                                actStreet = actStreet;
                                actCity = actCity;
                                actState = actState;
                                actZip = actZip;
                                actCountry = actCountry;
                                actMultiPerson = actMultiPerson;
              }
          }

  init: function(component, event, helper) {

    var allEvents = [];

    var action = component.get('c.getAllActivities');

 
    action.setCallback(this, function(response) {
      var state = response.getState();
      if (state === "SUCCESS") {
        component.set('v.AllActivities', response.getReturnValue());

        allEvents = response.getReturnValue();


      }

    });
    $A.enqueueAction(action);
  },
 
Hi All
How can I develop a custom page like bellow page?  Can anybody share some sample code.
User-added image

Here's what I've been staring at for 16 minutes so far. 

User-added image

Deployed via SFDX, specifying a single apex test to run, which has less than 40 lines of code. Takes only a fraction of a second to run in scratch org or sandbox.

But when I deploy to Production, all components are validated within a minute or two, then the status switches to 'Running {testname}'.... and stays that way. For literally 15 minutes or more. Before the test is even started. 

I'm not finding a lot of posts on this issue. Plenty of people talking about the time it takes to actually run the test. But I'm talking about the time it takes to start running the tests. This isn't a one time thing, but it also isn't consistent. Sometimes the tests will begin running pretty much immediately. Sometimes I'll end up cancelling and redeploying because a 30 minute delay to START testing seems ridiculous even given Salesforce's standards. And when I do cancel and redeploy? Good chance it'll take a fifth of the time, for no apparent reason.

What I'd really like is some better communication during this process. Why is my test run delayed? What was prioritized ahead of it? How can I anticipate deployment times so it's not a complete crapshoot regardless of build size? 

Hello everyone!

User-added image
I have 3 processes calling 3 flows and would like to combine them into one - see the above diagram to get a better understanding of the requirements. Efficient way would be to have all these 3 processes calling 3 flows consolidate into one process calling one flow.
I would like a process triggered when a new application is created via survey money and a few parameters are passed to a flow which in turn  will look up matching account and link it to an application and next will look up a matching contact and link that contact to the account in question and next link application to contact for complete tracking and reporting.
This created process triggers the flow and flow does not go beyond first step of looking up account.
FYI - Current process is that application sbmitted via Survey Monkey creates 3 records in salesforce - Application, Account and Contact. If account and contact already exist,  duplicate accounts and/or contacts are not created.
Did anyone experience a similar issue ? Any insight ?

Our schema when we migrated from the previous CRM to Salesforce was an absolute nightmare.  Once we moved to SF, I was granted the role as our SF admin.  After building our integration to our website, I thought I had grown to be very familiar with most of our data.  There is a specific permission that I need to grant on the website based on a pretty awful series of rollups that need to happen, but I'm struggling to get everything to work correctly.  I'll try to properly map out the chain of events that need to be followed.  I am using DLRS to do what I can.

The primary objects that need to be focused on are as follows (mostly custom objects): Account, License Servers, License Sites, License Products, License Content

License Product contains the determining value
License Content has a lookup to License Product and License Server
Account has a lookup to License Server but none of the others.
License Sites has a lookup to up to 2 different accounts ( main and secondary locations), but none of the others.

1) If License Content is associated with a License Product that contains a specific value, and the License Content expiration date is not past, then the value is equal to the amount of license seats exist in License Content.
2) If the License Content has this value > 0, then License Server sees this value as available seats for this desired License.
3) If License Server shows a positive number of active seats, then the Account will know that it has X amount of seats.

This is where it gets weird, because Account needs to reflect the total of available seats for both the License Site where it is the main location AND ALL of the License Sites where it is a secondary location.

So to add to the previous steps, Account needs to show a value equal to the number of seats from the site where it is the main location, PLUS all of the sites where it is the secondary location. 

Currently, what I have in place is as follows:

1) License_Content__c has a formula field to show active seats of the designated license if it has not expired.  (WORKS)
2) License_Server__c has a Number field where DLRS looks uses a lookup relationship From License_Server__c to License_Content__c where the lookup ID = the License_Server__c record. (WORKS)
3) Account needs to reflect the number of seats where it is a main location.  I have a DLRS rollup where the Parent is Account, the Child is License_Server__c and the relationship field is the ID of the Account.  The field to aggregate is the correctly populated field from step 2 (DOES NOT WORK - BLANK)
4) License_Sites__c needs to do its own separate rollup where each License_Site__c record reflects the number of active seats in its secondary location, so Accounts step 3 needs to function for this to work
5) Account now needs a rollup that contains the total number of license seats where it is a secondary location in License_Sites__c. 

This structure is horrible, but it has been in place for years and years, and I don't think there is any way we can consolidate and normalize.  I've been working on this problem for far too long, and I'm still running into issues with step 3, even though the correct values are in place and it just seems like the DLRS summary is not filling any values in.  This whole thing is super overwhelming because of how massively confusing it is, so there might be a really easy way to take care of this that I'm not seeing. 

Is there a simpler way to handle this?  Or do I need to change the way I am using these DLRS rollups?  Please let me know if any clarity is needed on the process that should be followed.