• Rick Rossi
  • NEWBIE
  • 10 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 6
    Replies
Hello!

I am looking to do a trigger on the task that would send values to a custom object (Comments History). The custom object should inherit the following fields from the task: Comments, Subject, Name,  Created by, Related to.

Any help with a trigger would be great.

Thanx!
Hello, 

I am trying to come up with a trigger but no luck. The logic is on the account object which parent accounts cannot have parent accounts and child accounts cannot have child accounts.

Any help would be great!

Thank you
Hello,

I am getting the same error on my custom lightning component, which is a custom component for account hierarchy. Any help would be great:

Message:Action failed: c:AccountHierarchy$controller$init [helper.checkForParent is not a function]

This is where the error occurs in my helper:

{
    checkForParent : function(component, event, helper) {
        var action = component.get("c.hasParent");
        var acctId = component.get('v.recordId');
        action.setParams({"accountId": acctId});

        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var result = response.getReturnValue();
                component.set("v.hasParent", result);
            }
        });
        $A.enqueueAction(action);
    },

    checkForChildren : function(component, event, helper) {
        var action = component.get("c.numChildren");
        var acctId = component.get('v.recordId');
        action.setParams({"accountId": acctId});

        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var result = response.getReturnValue();
                component.set("v.numChildren", result);
                if(result == 1) {
                    component.set("v.childOrChildren", "child");
                } else {
                    component.set("v.childOrChildren", "children");
                }
            }
        });
        $A.enqueueAction(action);
    }
})

Hello!
 
I need a validation that should not be on the creation of a lead but only on the edit on the lead. If my text field (reason why) is populated, then picklist A and Picklist B cannot be blank.
 
Any help would be great!
 
Thanx!
Hello,

Is it possible to have a contact trigger in which it clears a formula value if another field stores the same value? the logic is if the phone number is the same as the custom formula field phone number then the custom formula field will clear its value and turns blank.

Thnx!
Hello!

I am trying to do a mass update of all account emails to "testing.com"
however I am getting an error message saying my variable does not exist. This is my class.

global class BatchUpdateAccountField implements Database.Batchable <SObject>{
global Database.QueryLocator start (Database.BatchableContext bc)
{
    return Database.getQueryLocator('SELECT name from Account');
}
   global void execute(Database.BatchableContext bc, List<Account> acList)
   {
       for(Account ac :acList)
       {
          ac.email = ac.email + ' Testing.com';
           
       }
       
       update acList;
   }
    
    global void finish(Database.BatchableContext bc)
    {
        System.debug('>>>Finish');
    }
    
}


Any help would be great!
Hi all!

What would a trigger be to clear a value in a formula field if a new value in a different field is populated? I have two email fields "New email"  and "Temp email" once the new email field is populated than the "Temp Email" field should be blank.

Any help would be great!
Hi!

What would a batch class look like if I want to update any email field on the account, object, and lead to "In Development". I am having issues inserting the objects in an apex class, any help would be great.

Thanks!
Apex Class Question: How would I send an email to a public group once a duplicate lead is converted into a duplicate account and contact? I keep recieving error messages on mine, any help would be great.

Thanks!
Hi!

I am trying to update all case subject values to "Case Subject"

How would this look like if I want to do this in a batch class? I am running into errors.

Thank you!
I am trying to mask the case object (case subject) to a value of "N/A"how woudl that look in an apex class?

Thanks!
Hello,

I currently cannot use the out of the box duplicate/matcing rules for the contact object due to the amount of duplicates. How would a trigger look like to allow duplicates but notifity the users that a duplicates exist? The criteria is exact Account ID, email, and fuzzy first and last name.

Thanx!
I get the following message for my public class however I cant seem to find where the error is.


Error: Unknown property 'String.name'

<apex:page controller="importDataFromCSVController">
    <apex:form >
        <apex:pagemessages />
        <apex:pageBlock >
            <apex:pageBlockSection columns="4"> 
                  <apex:inputFile value="{!csvFileBody}"  filename="{!csvAsString}"/>
                  <apex:commandButton value="Import Account" action="{!importCSVFile}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock >
           <apex:pageblocktable value="{!accList}" var="acc">
              <apex:column value="{!acc.name}" />
              <apex:column value="{!acc.AccountNumber}" />
              <apex:column value="{!acc.Type}" />
              <apex:column value="{!acc.Accountsource}" />
              <apex:column value="{!acc.Industry }" />
        </apex:pageblocktable>
     </apex:pageBlock>
   </apex:form>
</apex:page>
Hello, 

I am trying to come up with a trigger but no luck. The logic is on the account object which parent accounts cannot have parent accounts and child accounts cannot have child accounts.

Any help would be great!

Thank you
Hello,

I am getting the same error on my custom lightning component, which is a custom component for account hierarchy. Any help would be great:

Message:Action failed: c:AccountHierarchy$controller$init [helper.checkForParent is not a function]

This is where the error occurs in my helper:

{
    checkForParent : function(component, event, helper) {
        var action = component.get("c.hasParent");
        var acctId = component.get('v.recordId');
        action.setParams({"accountId": acctId});

        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var result = response.getReturnValue();
                component.set("v.hasParent", result);
            }
        });
        $A.enqueueAction(action);
    },

    checkForChildren : function(component, event, helper) {
        var action = component.get("c.numChildren");
        var acctId = component.get('v.recordId');
        action.setParams({"accountId": acctId});

        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var result = response.getReturnValue();
                component.set("v.numChildren", result);
                if(result == 1) {
                    component.set("v.childOrChildren", "child");
                } else {
                    component.set("v.childOrChildren", "children");
                }
            }
        });
        $A.enqueueAction(action);
    }
})

Hello!
 
I need a validation that should not be on the creation of a lead but only on the edit on the lead. If my text field (reason why) is populated, then picklist A and Picklist B cannot be blank.
 
Any help would be great!
 
Thanx!
Hi!

I am trying to update all case subject values to "Case Subject"

How would this look like if I want to do this in a batch class? I am running into errors.

Thank you!
Hello,

I currently cannot use the out of the box duplicate/matcing rules for the contact object due to the amount of duplicates. How would a trigger look like to allow duplicates but notifity the users that a duplicates exist? The criteria is exact Account ID, email, and fuzzy first and last name.

Thanx!
I get the following message for my public class however I cant seem to find where the error is.


Error: Unknown property 'String.name'

<apex:page controller="importDataFromCSVController">
    <apex:form >
        <apex:pagemessages />
        <apex:pageBlock >
            <apex:pageBlockSection columns="4"> 
                  <apex:inputFile value="{!csvFileBody}"  filename="{!csvAsString}"/>
                  <apex:commandButton value="Import Account" action="{!importCSVFile}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock >
           <apex:pageblocktable value="{!accList}" var="acc">
              <apex:column value="{!acc.name}" />
              <apex:column value="{!acc.AccountNumber}" />
              <apex:column value="{!acc.Type}" />
              <apex:column value="{!acc.Accountsource}" />
              <apex:column value="{!acc.Industry }" />
        </apex:pageblocktable>
     </apex:pageBlock>
   </apex:form>
</apex:page>