• rornelas
  • NEWBIE
  • 60 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 9
    Replies
Hello, I've been trying to find a way to query the salesforce sharing object and haven't found a way other than the API. Does anybody know the syntax to a query sharing object in Salesforce? or how I would do it via the api
I'm troubleshooting a latency issue on sfmobile app using x-code to test on iphone device. How do I check for the network request?
Hi, Everyone,

I have a numeric field that I need help on. I have the following ranges I need to incorporate into the formula, however, when ever i add into the formula editor it does not let me compile. I know it's something simple :( Any help is greatly appreciated!!

$30-$40
$40-$50
$50-$60
$60-$70
$70-$80
$80-$90
$90-$100
$100-$125
$125-$150
$150-$175
$175-$200
$200+

 
IF (AnnualRevenue >= 30, "30-40",
IF (AnnualRevenue >= 40, "40-50",
IF (AnnualRevenue >= 50, "50-60",
IF (AnnualRevenue > 0, "no rate",
"No Score"))))

 
Hi, Everyone,

I'm looking for a plug-in for outlook and gmail that will sync events created in gmail or outlook on to the saelsforce calendar. in addition i am looking for something that will intelegently relate to and/or populate name of account and contact on the event from gmail or outlook. I know Einstein Activity Capture has the capactity as far as the AI to intelegently link these events with existing accounts or contacts. Thoughts??
Hi Team,

I've been tasked to develop a managed extensions for an app on the AppExchange. What kind of dev org do I set up for this and where do I sign up for one? 

From the looks of this article, https://help.salesforce.com/articleView?id=publish_extensions.htm&type=5

I can just use a dev org as long as I have the Create AppExchange Packages OR will the managed package provider need to create the org for me. Thoughts??
Hi Team,

I have a process builder that is running on my check-in object. I only want it to create an event when a certain field is updated. Basically, in our world, a check in the record contains a check out as well which is just a field that gets populated when the user checks out. 
 
Hi All,

I'm working with this formula below, it works great for past dates but need to have somethign to help me with dates in the future (i.e. for task that were made in the future). Not sure if the today function needs to change or if I need to add something to.
 
IF(TODAY() - LastActivityDate = 0, "Today",
IF(TODAY() - LastActivityDate <= 30, "Last 30 Days",
IF(TODAY() - LastActivityDate <= 60, "Last 60 Days",
IF(TODAY() - LastActivityDate <= 90, "Last 90 Days",
IF(TODAY() - LastActivityDate <= 180, "Last 180 Days",
IF(TODAY() - LastActivityDate <= 360, "Last 360 Days",
IF(TODAY() - LastActivityDate > 360, "Over a year", "No Activity"
)))))))

 
I have a challenging use case here. I have a customer who has alpha and numeric values and wants to have more control over how the data is sorted. Adding a formula field of num type return wouldn't work since there are two types.
I've tried to import into geolocation datatype field 10 decimal. Also tried custom geolcation data type field and wasn't able to import. i keep getting an error message and its faling.

User-added image

Please try this CSV file
 
Hi Everyone,

I have a a lookup field that gets populated with the territory name by a Managed package. I want to take the value of this lookup and populate an existing text field.  This is what I have so far. Any help would be greatly appreciated!
 
trigger UpdateExistTerritory on Service_Order__c (before insert, before update) {
    List<Service_order__c> ServiceTerr = new List<Service_order__c>();
    for(Service_order__c servOrder : trigger.new){
        if(servOrder.ManagePckgTerritory__r.Name  != null){
            servOrder.ManagePckgTerritory__r  = servOrder.ExistingText_field__C;
            ServiceTerr.add(servOrder);
        }
    }
    update ServiceTerr;
   
}

 
Hi Everyone,

Im looking for a formula field to trim text before street address. For example my street addresses are all entered this way " p/o maria Jenkins 123 West way Ave". An ideal solution would trim any text before the address and only leave me with "123 West way Ave". The address will always start with a numeric values.

Is this even possible with a formula field?
Hi Everyone,

I have the formula field below which works great. Basically if Account_Number__c contains '-1' it will populate ShippingStreet, else, BillingStreet.
IF(  CONTAINS(Account_Number__c , "-1") , ShippingStreet , BillingStreet)

Now, I want to add default address field so a third condition. So what I'm looking for is if Account_Number__c contains '-1' populate ShippingStreet, else, Billing​Street, if Billing Street is blank populate ShippingStreet.
Hi Everyone,

If I have a rollup field on account from rolling up opportunties $ will the currency be converted to what is set on my locale in my user personal settings or are there other implications I shoud know about.
Hi Everyone,

I need a way determine if the accountNumber field contains -1. I got it work when -1 is the only value in the account number field. The formula needs to identify identify wether -1 is present the string (i.e. 11706-1). Not sure what else I need to do here.
 
IF(  CONTAINS("-1", Site) , BillingCity , 
IF(   NOT( CONTAINS("-1", Site) ), ShippingCity , 
IF(  CONTAINS("", Site)  , ShippingCity , BillingCity) ) )

 
I have a Custom Object with two lookups. One lookup is to the Account and the other is to Contacts.I want a formula field  that will check IF Account Lookup is populated use billing address, else, Use Contacts Mailing address and in the event that both lookups are populated it should default to the account lookup address

 
Have a fromula below that depending on how many checked it will sum up values into formula field with number return type. I would like to take this value in this formula field and create another that will convert to hrs.
 
IF (checkbox1__c, 15, 0) +  IF (checkbox2__c, 30, 0) + IF (checkbox3__c, 90, 0)

User-added image
I have the formula field that based on the picklist selection it will populate the appropiate time. Using the picklist is limited and would like to use checkboxes so that way for each checbox checked it will calculate the time that way i.e checkbox 1 10min, checbox 2 60min = 70min. Hopefully this makes sense. Here is the formula field with picklist im working with.
 
Case( Stop_Complexity__c,
"Easy",15,
"Moderate",30,
"Difficult",90,
null)

 
Hi Everyone,

I have this code below. Can anybody tell me why this code throws the Null Pointer exception?
 
try

{

List<String> nameList;

Account a;

String s = a.Name;

nameList.add( s );

}

catch ( ListException le )

{

System.debug('List Exception');

}

catch ( NullPointerException npe )

{

System.debug('NullPointer Exception');

}

catch ( Exception e )

{

System.debug('Generic Exception');

}

 
I'm using the Picture uploader app to upload and display pictures on my record layouts. I created a Post/VF Action in Geopointe which basically displays my pic on the pop for my contact and in SF1 creates a button to show picture as demonstrated below. I've already set the dimenstions size of my pic on the POST / Visualforce Actions  and added the URL /apex/c__showPicture?id={!id}​


Two questions:

1. Are there any optons to add anything to URL or anythign else I can do to change the position of the image in web and SF1
2. The Picture Uploader app exposes the Apex Classes and VF pages associated to that app. Does this mean I can modify the classes and VF page for this app? 

User-added image

User-added image
Experiencing some very odd behavior with my Trigger my Class curly braches are in red even though my class compiles. Now my trigger appears not be working. My // On After Update Trigger method worked, but now it doesn't. One thing I noticed is that when I added //OnBeforeInsert 
public class contact_trigger_handler {
     public static Boolean isFirstTime = True;
    
    public Contact_trigger_handler() { }
    
     // On Before Insert 
     // http://salesforce.stackexchange.com/questions/63314/insert-trigger-on-accountusing-map
public void OnBeforeInsert(List<Contact> con_amt) {
Double Total_Amount = 0;
for( Contact c1: [Select Amount__c from Contact Where CreatedDate=TODAY AND CreatedbyID = :UserInfo.getUserId() ] ) 
	{
Total_Amount = Total_Amount + c1.Amount__c;
}

for(Contact c2 : con_amt)
{
Total_Amount = Total_Amount + c2.Amount__c;
if(Total_Amount > 100000)
{
c2.addError('You have exceeded your daily limit');
}   
}

    
// Here taking the Set because we dont need to maintain duplicate

Set<Id> accIdSet = new Set<Id>();

for( Contact con : con_amt ) 
{
if(con.AccountId != null) 
{
accIdSet.add(con.AccountId);
}
}

List<Account> accList = [Select Id, Name, Type from Account where Id IN :accIdSet ];
if(!accIdSet.isEmpty()) 
{
for(Contact con : con_amt ) 
{
if(con.AccountId != null) 
{
for(Account acc: accList) 
{
if(con.AccountId == acc.Id) 
{
con.Acc_Type__c = acc.Type;
}
}
}
}
}

}
    // On After Insert
    public void OnAfterInsert(List<Contact> newRecords) {

    }

    // On Before Update
    public void OnBeforeUpdate(List<Contact> oldRecords, List<Contact> newRecords, Map<Id, Contact> newRecordsMap) {
    
        
        
    }
    // On After Update
        public void onAfterUpdateEvent(List<Contact> con_List) {
            List<Contact> con_to_be_update = new List<Contact>();
            system.debug('Trigger new Size ' +con_list.size());
            for(Contact con :con_List) {
            system.debug('Trigger Updating Properly .... ' + con.Languages__c);            
            con_to_be_update.add(new Contact(Id=con.Id, Second_Language__c = con.Languages__c));
            }
            if(con_to_be_update.size() > 0){
                update con_to_be_update;
            }
        }
    
    // On Before Delete
    // http://developer.force.com/cookbook/recipe/comparing-queries-against-trigger-old-and-trigger-new
    public void OnBeforeDelete(List<Contact> deletedRecords, Map<Id, Contact> deletedRecordsMap) {
    /*for (Job_Applications__c jobApp : [SELECT Id
                                      FROM Job_Applications__c
                                      WHERE Candidate__c
                                      IN :Trigger.oldMap.keySet()]) {
        Trigger.oldMap.get(jobApp.Candidate__c).addError(
                   'Cannot delete candidate with a job application');
    }*/
       /*
        for(Contact co : Trigger.Old){
        Job_Applications__c chlist = [select id, Candidate__c from Job_Applications__c where Candidate__c =: co.id];  //list to hold child matches the parent
        if(chlist.size() > 0){
            co.adderror('Child record is refering this record...So, you cannot delete it...!');
        
   }
}*/
       
    }

    // On After Delete
    public void OnAfterDelete(List<Contact> deletedRecords, Map<Id, Contact> deletedRecordsMap) {

    }

    // On Undelete
    public void OnUnDelete(List<Contact> undeletedRecords) {

    }           
}

User-added image
Hi Everyone,

I need a way determine if the accountNumber field contains -1. I got it work when -1 is the only value in the account number field. The formula needs to identify identify wether -1 is present the string (i.e. 11706-1). Not sure what else I need to do here.
 
IF(  CONTAINS("-1", Site) , BillingCity , 
IF(   NOT( CONTAINS("-1", Site) ), ShippingCity , 
IF(  CONTAINS("", Site)  , ShippingCity , BillingCity) ) )

 
Hi Everyone,

I have a a lookup field that gets populated with the territory name by a Managed package. I want to take the value of this lookup and populate an existing text field.  This is what I have so far. Any help would be greatly appreciated!
 
trigger UpdateExistTerritory on Service_Order__c (before insert, before update) {
    List<Service_order__c> ServiceTerr = new List<Service_order__c>();
    for(Service_order__c servOrder : trigger.new){
        if(servOrder.ManagePckgTerritory__r.Name  != null){
            servOrder.ManagePckgTerritory__r  = servOrder.ExistingText_field__C;
            ServiceTerr.add(servOrder);
        }
    }
    update ServiceTerr;
   
}

 
Hi Everyone,

I have the formula field below which works great. Basically if Account_Number__c contains '-1' it will populate ShippingStreet, else, BillingStreet.
IF(  CONTAINS(Account_Number__c , "-1") , ShippingStreet , BillingStreet)

Now, I want to add default address field so a third condition. So what I'm looking for is if Account_Number__c contains '-1' populate ShippingStreet, else, Billing​Street, if Billing Street is blank populate ShippingStreet.
Have a fromula below that depending on how many checked it will sum up values into formula field with number return type. I would like to take this value in this formula field and create another that will convert to hrs.
 
IF (checkbox1__c, 15, 0) +  IF (checkbox2__c, 30, 0) + IF (checkbox3__c, 90, 0)

User-added image
I have the formula field that based on the picklist selection it will populate the appropiate time. Using the picklist is limited and would like to use checkboxes so that way for each checbox checked it will calculate the time that way i.e checkbox 1 10min, checbox 2 60min = 70min. Hopefully this makes sense. Here is the formula field with picklist im working with.
 
Case( Stop_Complexity__c,
"Easy",15,
"Moderate",30,
"Difficult",90,
null)

 
Experiencing some very odd behavior with my Trigger my Class curly braches are in red even though my class compiles. Now my trigger appears not be working. My // On After Update Trigger method worked, but now it doesn't. One thing I noticed is that when I added //OnBeforeInsert 
public class contact_trigger_handler {
     public static Boolean isFirstTime = True;
    
    public Contact_trigger_handler() { }
    
     // On Before Insert 
     // http://salesforce.stackexchange.com/questions/63314/insert-trigger-on-accountusing-map
public void OnBeforeInsert(List<Contact> con_amt) {
Double Total_Amount = 0;
for( Contact c1: [Select Amount__c from Contact Where CreatedDate=TODAY AND CreatedbyID = :UserInfo.getUserId() ] ) 
	{
Total_Amount = Total_Amount + c1.Amount__c;
}

for(Contact c2 : con_amt)
{
Total_Amount = Total_Amount + c2.Amount__c;
if(Total_Amount > 100000)
{
c2.addError('You have exceeded your daily limit');
}   
}

    
// Here taking the Set because we dont need to maintain duplicate

Set<Id> accIdSet = new Set<Id>();

for( Contact con : con_amt ) 
{
if(con.AccountId != null) 
{
accIdSet.add(con.AccountId);
}
}

List<Account> accList = [Select Id, Name, Type from Account where Id IN :accIdSet ];
if(!accIdSet.isEmpty()) 
{
for(Contact con : con_amt ) 
{
if(con.AccountId != null) 
{
for(Account acc: accList) 
{
if(con.AccountId == acc.Id) 
{
con.Acc_Type__c = acc.Type;
}
}
}
}
}

}
    // On After Insert
    public void OnAfterInsert(List<Contact> newRecords) {

    }

    // On Before Update
    public void OnBeforeUpdate(List<Contact> oldRecords, List<Contact> newRecords, Map<Id, Contact> newRecordsMap) {
    
        
        
    }
    // On After Update
        public void onAfterUpdateEvent(List<Contact> con_List) {
            List<Contact> con_to_be_update = new List<Contact>();
            system.debug('Trigger new Size ' +con_list.size());
            for(Contact con :con_List) {
            system.debug('Trigger Updating Properly .... ' + con.Languages__c);            
            con_to_be_update.add(new Contact(Id=con.Id, Second_Language__c = con.Languages__c));
            }
            if(con_to_be_update.size() > 0){
                update con_to_be_update;
            }
        }
    
    // On Before Delete
    // http://developer.force.com/cookbook/recipe/comparing-queries-against-trigger-old-and-trigger-new
    public void OnBeforeDelete(List<Contact> deletedRecords, Map<Id, Contact> deletedRecordsMap) {
    /*for (Job_Applications__c jobApp : [SELECT Id
                                      FROM Job_Applications__c
                                      WHERE Candidate__c
                                      IN :Trigger.oldMap.keySet()]) {
        Trigger.oldMap.get(jobApp.Candidate__c).addError(
                   'Cannot delete candidate with a job application');
    }*/
       /*
        for(Contact co : Trigger.Old){
        Job_Applications__c chlist = [select id, Candidate__c from Job_Applications__c where Candidate__c =: co.id];  //list to hold child matches the parent
        if(chlist.size() > 0){
            co.adderror('Child record is refering this record...So, you cannot delete it...!');
        
   }
}*/
       
    }

    // On After Delete
    public void OnAfterDelete(List<Contact> deletedRecords, Map<Id, Contact> deletedRecordsMap) {

    }

    // On Undelete
    public void OnUnDelete(List<Contact> undeletedRecords) {

    }           
}

User-added image
I need some help on using Geopointe app for drawing a  multipolygon shape on map using the latitude and longitude data that i have.Any help would be much appreciated.
what is Context-Specific Handler Methods in triggers?
 can any one explain wid example please>?