• Agustina Garcia
  • SMARTIE
  • 904 Points
  • Member since 2014
  • Principal Developer, Platform Strategy
  • FinancialForce.com


  • Chatter
    Feed
  • 23
    Best Answers
  • 1
    Likes Received
  • 5
    Likes Given
  • 11
    Questions
  • 214
    Replies
Hi Team,

Can anyone help me to fix this issue to Batch Class for Contacts not related to Case ASAP?

Thanks & Regards,
Karthikeyan Chandran
Map<String, Object> myMap = new Map<String, Object>();
myMap.put('removedPartId ', 'a0L1500000Mjavp');
Flow.Interview.FindPRC findPrcFlow= new Flow.Interview.FindPRC(myMap);
findPrcFlow.start();
  • December 23, 2016
  • Like
  • 0
Hello!

Using a visual force page with an embded flow, does anyone know how you can better layout your textboxes, labels, etc? I am not so much interested in the style(color, size, etc) but more so for the actual layout and location of the textboxes. 

For example:

inside of the flow designer, on the screen element you can only place one object per line:

Textbox 1
Textbox 2
Textbox 3

using a visual force page, how can I get these flow elements to be lined up on the same row? How Do I reference these elements inside of a visual force page?:

Textbox 1 Textbox 2 Textbox 3

Thank you!
Hi,
I have created one Batch Apex and scheduler class for execute on every 5 minute but this scheduler is not working , please help me 
Batch Apex --

global class BatchApexUpdateDemo implements Database.Batchable<sObject>
{

    global  Database.QueryLocator start(Database.BatchableContext con)
     {
      String query ='select Id, First_Name__c, Company__c , from User__c, Descriptiom__c';
      return Database.getQueryLocator(query);
    
     }
     
     global  void execute(Database.BatchableContext con, List<User__c> scope) {
     
         List<User__c> usrlist = new List<User__c>();
         for(User__c usr : scope )
          {
           usr.Descriptiom__c = usr.First_Name__c+' '+usr.Company__c;
           usrlist.add(usr);
          }
      
           update usrlist;
     }
     
     public void finish(Database.BatchableContext BC) 
     {
     
     
        AsyncApexJob a = [SELECT Id, Status, NumberOfErrors,
        JobItemsProcessed,TotalJobItems, CreatedBy.Email
        FROM AsyncApexJob WHERE Id =:BC.getJobId()];
        String UserEmail = 'bhushansingh226@gmail.com';
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        mail.setToAddresses(new String[] {UserEmail});
        mail.setReplyTo('rathore.bhushan22@gmail.com');
        mail.setSenderDisplayName('Batch Processing');
        mail.setSubject('Batch Process Completed');
        mail.setPlainTextBody('Batch Process has completed');
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
     }
}

Schedular class ---

global class schduleBatchOfUser implements Schedulable {

   global void execute(SchedulableContext ctx) {
     
     BatchApexUpdateDemo p = new BatchApexUpdateDemo();
      database.executeBatch(p);
      String sch1 = '0 5 * * * ?';
      
      schduleBatchOfUser sch2 = new schduleBatchOfUser();
      system.schedule('Every Hour plus 0 min', sch1, sch2);

      
   }   
}

Error message I receive
I keep getting this error message on Hands-on challenge.

It's bit frustrating, because I've double checked everything.

Create an opportunity with the Opportunity Name = '500 units' - Done
Stage = Prospecting - Done
with any Amount and any Close Date in the future - Done 
Pick any value for the Account Name - Done
Add yourself to the opportunity team for the '500 units' opportunity with the Team Role of 'Sales Rep'. - Done and done.

Would anybody be so kind (and smarter than me) to help me with this problem?

IF(TEXT(Target_Metric_has_been_met__c)=='Yes', OTI_Targeted_Objective__c ,0)

Target_Metric_has_been_met__c  picklist
OTI_Targeted_Objective__c   formula field

How to update these values in process builder. Could you please help me out
 
  • November 24, 2016
  • Like
  • 0
Data import Wizard question?
I am trying my first attempt at Data Import Wizard. I am attemping to upload a small amount of info first attempt. All Im trying to add is the Terms I created for our HEDA environment. There are 4 terms in the year which include start and stop dates. Why when i try to uplad does it tell me I need to map an Account?
User-added imageUser-added imageUser-added imageUser-added image
below are two working query for getting close date on current and last fiscal year..but i want a query to get opportunity having close date two years before something like: (CloseDate = LAST_FISCAL_YEAR-1)

1]   [SELECT SUM(Amount),AccountId FROM opportunity where AccountId IN :AccountIDsAND CloseDate=LAST_FISCAL_YEAR GROUP BY AccountId]

2]   [SELECT SUM(Amount),AccountId FROM opportunity where AccountId IN :AccountIDsAND CloseDate=THIS_FISCAL_YEAR GROUP BY AccountId]
 
here i am generating xml file.proviously it was working fine now i am getting error too many soql queries.
here i am generating XML file.it was working fine till now. but now iam facing this exception.
my code is

public class OutBoundListingData {
    
    public static string genratedXML{get;set;}
    
    public OutBoundListingData()
    {
        GenerateListingXML();
    }
    
    public static List<pba__Listing__c> getListingRecords()
    {
        List<pba__Listing__c> objListListing=[select Id,ListingId__c,pba__Property__c,Common_Charges__c,pba__Address_pb__c,
                                              of_Units__c,pba__City_pb__c,pba__State_pb__c,pba__PostalCode_pb__c,
                                              pba__Latitude_pb__c,pba__Longitude_pb__c,pba__Country_pb__c
                                              ,Street_Intersection__c,Display_Address__c,pba__Status__c,
                                              Listing_Status__c,pba__ListingType__c,pba__ListingPrice_pb__c,
                                              pba__Listing_Website__c,Listed_Date__c,Listing_Email__c,Move_in_Date__c,
                                              HasGarden__c,HasBackyard__c,HasBalcony__c,HasTerrace__c,HasPrivateRoofDeck__c,
                                              HasPrivateCourtyard__c,HasStorageSpace__c,HasGarage__c,HasRoofGarden__c,
                                              HasHealthClub__c,HasCourtyard__c,UtilitiesIncluded__c,HasWasherDryer__c,
                                              Pets_Allowed__c,Commission__c,OPPaidToCobroker__c,Lease_Term_Type__c,
                                              Lease_Type__c,Move_In_Fee__c,Move_Out_Fee__c,Pet_Security_Amount__c,
                                              Security_Deposit__c,Fee_Type__c,Name,pba__Description_pb__c,pba__Bedrooms_pb__c,
                                              pba__FullBathrooms_pb__c,Rooms__c,pba__LotSize_pb__c,pba__YearBuilt_pb__c,
                                              Prepost__c,pba__PropertyType__c,Building_Description__c,Condition__c,
                                              Exposures__c,Showing_Instructions__c,View__c,NewDevelopment__c,
                                              Construction_Era__c,Building_Type__c,Lobby_Attendance__c,Block__c,
                                              Management_Company__c,pba__Listing_Agent_Firstname__c,
                                              pba__Listing_Agent_Lastname__c,pba__Listing_Agent_Email__c,
                                              pba__Listing_Agent_Photo__c,pba__Listing_Agent_Mobil_Phone__c,
                                              pba__Listing_Agent_Phone__c,Listing_Agent_Brokerage_Name__c,
                                              pba__Listing_Agent_Street__c,pba__Listing_Agent_City__c,pba__Listing_Agent_Zip__c,
                                              Neighborhood__c,Neighborhood_Description__c,Appliances__c,Cooling_Systems__c,
                                              Elevator__c,Exterior_Types__c,Floor_Coverings__c,of_Floors__c,NewConstruction__c ,
                                              Listing_Secondary_Agent_Firstname__c,Listing_Secondary_Agent_Lastname__c,
                                              Listing_Secondary_Agent_Email__c,Listing_Secondary_Agent_Photo__c,
                                              Listing_Secondary_Agent_Mobil_Phone__c,Listing_Secondary_Agent_Phone__c,
                                              Listing_Secondary_Agent_Brokerage_Name__c,Listing_Secondary_Agent_Street__c,
                                              Listing_Secondary_Agent_City__c,Listing_Secondary_Agent_Zip__c ,
                                              Floorplan_URL__c,Listing_URL__c from pba__Listing__c where RLSListingKey__c=null];
        return objListListing;
    }
    public static void GenerateListingXML()
    {
        XmlStreamWriter w =new XmlStreamWriter();  
        w.writeStartElement(null,'Listings',null);            
            for(pba__Listing__c Item : getListingRecords()){               
                w.writeStartElement(null,'Listing',null);               
                w.writeStartElement(null, 'Type', null);
                w.writeCharacters(Item.pba__ListingType__c);  
                w.writeEndElement();
                w.writeStartElement(null, 'WebID', null);
                w.writeCharacters(Item.Id);
                w.writeEndElement();
                w.writeStartElement(null,'ListingId', null);
                w.writeCharacters(Item.ListingId__c);
                w.writeEndElement();
                w.writeStartElement(null, 'CommonCharges', null);
                if(Item.Common_Charges__c!=null)
                    w.writeCharacters(String.valueOf(Item.Common_Charges__c));  
                w.writeEndElement();              
                w.writeStartElement(null, 'Floorplans', null);               
                w.writeStartElement(null, 'Floorplan', null);
                w.writeStartElement(null, 'PictureUrl', null);
                if(Item.Floorplan_URL__c!=null)
                    w.writeCharacters(String.valueOf(Item.Floorplan_URL__c));  
                w.writeEndElement();   
                w.writeEndElement();                 
                w.writeEndElement();                 
                w.writeStartElement(null, 'Commission', null);
                if(Item.Commission__c!=null)
                    w.writeCharacters(String.valueOf(Item.Commission__c));  
                w.writeEndElement();              
                w.writeStartElement(null, 'UnitNumber', null);
                if(Item.of_Units__c!=null)
                    w.writeCharacters(String.valueOf(Item.of_Units__c));  
                w.writeEndElement();    
                w.writeStartElement(null, 'City', null);
                if(Item.pba__City_pb__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__City_pb__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'State', null);
                if(Item.pba__State_pb__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__State_pb__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Zip', null);
                if(Item.pba__PostalCode_pb__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__PostalCode_pb__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Lat', null);
                if(Item.pba__Latitude_pb__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__Latitude_pb__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Long', null);
                if(Item.pba__Longitude_pb__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__Longitude_pb__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'County', null);
                if(Item.pba__Country_pb__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__Country_pb__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'StreetIntersection', null);
                if(Item.Street_Intersection__c!=null)
                    w.writeCharacters(String.valueOf(Item.Street_Intersection__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'DisplayAddress', null);
                if(Item.Display_Address__c!=null)
                    w.writeCharacters(String.valueOf(Item.Display_Address__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Neighborhood', null);
                if(Item.Neighborhood__c!=null)
                    w.writeCharacters(String.valueOf(Item.Neighborhood__c));  
                w.writeEndElement();               
                w.writeEndElement();
                w.writeStartElement(null, 'ListingDetails', null);               
                w.writeStartElement(null, 'Status', null);
                if(Item.pba__Status__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__Status__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'ListingStatus', null);
                if(Item.pba__Status__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__Status__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'ListingType', null);
                if(Item.pba__ListingType__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__ListingType__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Price', null);
                if(Item.pba__ListingPrice_pb__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__ListingPrice_pb__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'ListingUrl', null);
                if(Item.pba__Listing_Website__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__Listing_Website__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'DateListed', null);
                if(Item.Listed_Date__c!=null)
                    w.writeCharacters(String.valueOf(Item.Listed_Date__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'ListingEmail', null);
                if(Item.Listing_Email__c!=null)
                    w.writeCharacters(String.valueOf(Item.Listing_Email__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'DateAvailable', null);
                if(Item.Move_in_Date__c!=null)
                    w.writeCharacters(String.valueOf(Item.Move_in_Date__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasGarden', null);
                if(Item.HasGarden__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasGarden__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasBackyard', null);
                if(Item.HasBackyard__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasBackyard__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasBalcony', null);
                if(Item.HasBalcony__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasBalcony__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasTerrace', null);
                if(Item.HasTerrace__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasTerrace__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasPrivateRoofDeck', null);
                if(Item.HasPrivateRoofDeck__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasPrivateRoofDeck__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasPrivateCourtyard', null);
                if(Item.HasPrivateCourtyard__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasPrivateCourtyard__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasStorageSpace', null);
                if(Item.HasStorageSpace__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasStorageSpace__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasGarage', null);
                if(Item.HasGarage__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasGarage__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasRoofGarden', null);
                if(Item.HasRoofGarden__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasRoofGarden__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasHealthClub', null);
                if(Item.HasHealthClub__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasHealthClub__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasCourtyard', null);
                if(Item.HasCourtyard__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasCourtyard__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'UtilitiesIncluded', null);
                if(Item.UtilitiesIncluded__c!=null)
                    w.writeCharacters(String.valueOf(Item.UtilitiesIncluded__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'HasWasherDryer', null);
                if(Item.HasWasherDryer__c!=null)
                    w.writeCharacters(String.valueOf(Item.HasWasherDryer__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'AllowsPets', null);
                if(Item.Pets_Allowed__c!=null)
                    w.writeCharacters(String.valueOf(Item.Pets_Allowed__c));  
                w.writeEndElement();                                 
                w.writeStartElement(null, 'PetSecurityAmount', null);
                if(Item.Pet_Security_Amount__c!=null)
                    w.writeCharacters(String.valueOf(Item.Pet_Security_Amount__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'SecurityDeposit', null);
                if(Item.Security_Deposit__c!=null)
                    w.writeCharacters(String.valueOf(Item.Security_Deposit__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'FeeType', null);
                if(Item.Fee_Type__c!=null)
                    w.writeCharacters(String.valueOf(Item.Fee_Type__c));  
                w.writeEndElement();                
                w.writeEndElement();
                w.writeStartElement(null, 'BasicDetails', null);                
                w.writeStartElement(null, 'Title', null);
                if(Item.Name!=null)
                    w.writeCharacters(String.valueOf(Item.Name));  
                w.writeEndElement();
                w.writeStartElement(null, 'Description', null);
                if(Item.pba__Description_pb__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__Description_pb__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Bedrooms', null);
                if(Item.pba__Bedrooms_pb__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__Bedrooms_pb__c));  
                w.writeEndElement();                  
                w.writeStartElement(null, 'Prepost', null);
                if(Item.Prepost__c!=null)
                    w.writeCharacters(String.valueOf(Item.Prepost__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'PropertyType', null);
                if(Item.pba__PropertyType__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__PropertyType__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'BuildingType', null);
                if(Item.Building_Type__c!=null)
                    w.writeCharacters(String.valueOf(Item.Building_Type__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'BuildingDescription', null);
                if(Item.Building_Description__c!=null)
                    w.writeCharacters(String.valueOf(Item.Building_Description__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Condition', null);
                if(Item.Condition__c!=null)
                    w.writeCharacters(String.valueOf(Item.Condition__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Exposures', null);
                if(Item.Exposures__c!=null)
                    w.writeCharacters(String.valueOf(Item.Exposures__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'ShowingInstructions', null);
                if(Item.Showing_Instructions__c!=null)
                    w.writeCharacters(String.valueOf(Item.Showing_Instructions__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Views', null);
                if(Item.View__c!=null)
                    w.writeCharacters(String.valueOf(Item.View__c));  
                w.writeEndElement();                          
                w.writeEndElement();            
                w.writeStartElement(null, 'Building', null);               
                w.writeStartElement(null, 'NewDevelopment', null);
                if(Item.NewDevelopment__c!=null)
                    w.writeCharacters(String.valueOf(Item.NewDevelopment__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'ConstructionEra', null);
                if(Item.Construction_Era__c!=null)
                    w.writeCharacters(String.valueOf(Item.Construction_Era__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'BuildingType', null);
                if(Item.Building_Type__c!=null)
                    w.writeCharacters(String.valueOf(Item.Building_Type__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'LobbyAttendance', null);
                if(Item.Lobby_Attendance__c!=null)
                    w.writeCharacters(String.valueOf(Item.Lobby_Attendance__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Block', null);
                if(Item.Block__c!=null)
                    w.writeCharacters(String.valueOf(Item.Block__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'Lot', null);
                if(Item.pba__LotSize_pb__c!=null)
                    w.writeCharacters(String.valueOf(Item.pba__LotSize_pb__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'ManagementCompany', null);
                if(Item.Management_Company__c!=null)
                    w.writeCharacters(String.valueOf(Item.Management_Company__c));  
                w.writeEndElement();               
                w.writeEndElement();             
                w.writeStartElement(null, 'Pictures', null);
                List<pba__PropertyMedia__c> ListImages= [select id,pba__URL__c from pba__PropertyMedia__c where pba__Property__c=:Item.pba__Property__c ];               
                for(pba__PropertyMedia__c objImages: ListImages)
                {
                    w.writeStartElement(null, 'Picture', null);                   
                    w.writeStartElement(null, 'PictureUrl', null);  
                    if(objImages.pba__URL__c != null)
                        w.writeCharacters(String.valueOf(objImages.pba__URL__c));  
                    w.writeEndElement();                    
                    w.writeEndElement();
                }
                w.writeEndElement();            
                w.writeStartElement(null, 'Videos', null);
                w.writeEndElement();
                w.writeStartElement(null, 'SecondaryAgent', null);               
                w.writeStartElement(null, 'FirstName', null);
                if(Item.Listing_Secondary_Agent_Firstname__c !=null)
                    w.writeCharacters(String.valueOf(Item.Listing_Secondary_Agent_Firstname__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'LastName', null);
                if(Item.Listing_Secondary_Agent_Lastname__c!=null)
                    w.writeCharacters(String.valueOf(Item.Listing_Secondary_Agent_Lastname__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'EmailAddress', null);
                if(Item.Listing_Secondary_Agent_Email__c!=null)
                    w.writeCharacters(String.valueOf(Item.Listing_Secondary_Agent_Email__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'PictureUrl', null);
                if(Item.Listing_Secondary_Agent_Photo__c!=null)
                    w.writeCharacters(String.valueOf(Item.Listing_Secondary_Agent_Photo__c));  
                w.writeEndElement();
                w.writeStartElement(null, 'MobilePhoneLineNumber', null);
                if(Item.Listing_Secondary_Agent_Mobil_Phone__c!=null)
                    w.writeCharacters(String.valueOf(Item.Listing_Secondary_Agent_Mobil_Phone__c));  
                w.writeEndElement();
               
              
               
          w.writeEndElement();
        string xml = w.getXmlString();
        w.close();
        genratedXML='<?xml version="1.0"?>'+xml;
    }
}

 
Hi,

I have created a new object called Factory with a field called Factory.name. I would now like to update all the Order records as I have added a lookup field from Order to the Factory Object to add the Factory.name on the order. The filter would be based on the customer name where I would like to run the update script for each customer separately. The upate would be all orders with the name of "Account Name to be added" , (preference would be to include multiple account names), and the Factory Name would = "Wolverhampton". I am not very well versed with DML or SFCD sql , however if someone could kindly provide the statement structure I would be very gratelful.

Many thanks

Toby
I have a package with a post install script that creates a scheduled job to run every day at 6:00. When I install the package, the job shows up under Monitoring / Schedule jobs, but it never actually fires. It says that the job was started at the correct time, but nothing actually happens (I have code to log start and end times of the job). 

When I execute the post-install code manually in the target environment it work fine. Here is the code excerpt from the post-install script.
 
ScheduleReminders autoRem = new ScheduleReminders();   // Apex class that implements Schedulable

system.schedule('AutoReminders',  '0 0 6 * * ?', autoRem);

Any ideas? 

Thanks

 

I'm trying to create a visual flow that checks the value of about 50 custom fields that are all TRUE\FALSE on a custom object. For each TRUE value, it creates a detail record.

Do I have to create a decision for each Boolean field? or is there a way to use a LOOP to go through 1 objects field values?

Any help would be appreciated. I'd rather now have a giant tree just to check whether a box is TRUE or FALSE.

Thank you!
Is there a way to change the position of the checkbox from the end of my field name to the beginning of the field name? below what I want to achieve...

User-added image
Hello,

I have created  a class and a trigger seperately for a  custom object. They are working good.  I wrote a TESTCLASS to check wehether my class is working or not. TestClass also successfully executed my method in the testClass with 100% code coverage.

Then, my question is , how my testClass can recognise the "class" particularly to test. I didnt call any class/Method in my TestClass to refer my actual logoc.    
 
Initial term of field expression 
​must be a concrete SObject: List<Contact> at line 12 column 6.
 
trigger CreateContact on Account (After Insert)
{
 
 //Collection of contacts for saving new contacts.
 List<Contact> conList =new List<Contact>();
 
 for(Account acc: trigger.new)
 {
     // For each Account create a new Contact.
     List<Contact> freshCon=new List<Contact>();
     
     freshcon.Accountid=acc.id;
     freshcon.LastName=acc.Name +'_'+ acc.CustomerPriority__c;
     
     //add new Contact to the collection.
     conList.add(freshcon);
     
 }
 
insert conList;
 

}
I want to transfer the data from opportunity to contract.
I had created CREATE CONTRACT button at opportunity page.
Now my requirement is that: Once opportunity will create and saved and user click on the CREATE CONTRACT button.
It will create a new contract for the same opportunity and pass all the field data from opportunity to contract.
So how can achieve this task (By Trigger, Classes or VF)
Email manager class 

public class EmailManager {

    public void sendMail(string Address,string subject, string body)
    {
    Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
    string [] toaddress = new string[]{address};
    email.setToAddresses(toaddress);
    email.setSubject(subject);
    email.setPlainTextBody(body);
    }
}


developer console 
EmailManager e = new EmailManager();
e.sendMail('xxx@domain.com','test email', 'test apex');
  • September 05, 2015
  • Like
  • 0
The ability to build custom lightning connect adapter is one the most exciting features in recent release, however I am trying to find a solution to able to provide externalId for the custom adapter.

You see the api that I had been trying to connect for pulling data has no unique identifier in the resultset, so now I am in a difficult position of not being able to provide ExternalID for building custom adapters.

I had been thinking of being of using integer for loop counter, but that way it wont be an identifier of the record in any way, any thoughts for providing externalId in custom adapters when there in such situation ?

"Each external object has an External ID standard field. Its values uniquely identify each external object record in an organization. When the external object is the parent in an external lookup relationship, the External ID standard field is used to identify the child records.....
The custom adapter’s Apex code must declare the DataSource.Column named ExternalId and provide its values. "

from: https://help.salesforce.com/apex/HTViewHelpDoc?id=apex_external_id.htm&language=en_US

 
Hi everyone,

We are working on a beta release for an AppExchange product, and I am installing the managed package in various dev orgs. I have noticed that if I select "Install for Admins Only" during setup, all elements are installed with access given only to System Administrator users, but if I later reinstall the same package and select "Install for All Users," nothing changes. If I install the package in a new org and select "Install for All Users," then all users are given access to the package. Is this how things are supposed to be?

Example:
I install the managed package and select "Install for Admins Only"
The field security for the custom field faxType on the Case object is set to Visible for the System Administrator profile only
I then reinstall the managed package and select "Install for All Users."
Salesforce gives the message "Installing and granting access for all users," but the field security on faxType remains Visible for System Administrators only.
If I want to grant all users access to the package, I have to first uninstall it.

I did a quick test by creating a small managed package with a single field, and I got the same results.

Is this right? If not, then what could be the reason for this behavior?
I'm trying to access a Sandbox org via a Connected App that is part of a package installed in the org.

However I cannot make it work and if I to the user that tries to log in, under the Login History I see this:

User-added image

I tried to solve it adding the IP at Network Access level and the Profile one, but it does not work either. 

Any suggestion would be really appreciated.

Thanks!
I have a user that should not receive any kind of emails. Neither package instalation notification nor a batch apex process has finished, for instance.
Is there a way to do it? Apex? Manually
Thanks!
 
Hi there,
My org has a PS and a Connected App and I would like to write a piece of code that do the assignment for me after installing a package. 

Running this piece of code from Dev Console, I get it work
SetupEntityAccess sea = new SetupEntityAccess(
   ParentId = ps.Id,
   SetupEntityId = connectedApp.Id
);
insert sea;

However it doesn't work from instalation script. In order to test it quickly I also created tab related to a VF page with a button that calls this code and it neither works.

I guess the reason is that Dev Console has more priviledges to run code rather than vf page or post instalation script. But I would like to find a way to make it work

Thanks!
Per Salesforce documentation, FlowTestCoverage and FlowElementTestCoverage will help us to determine if my Lightning Flows coverage is 75% at least.
But my question is about the beheviour, as I'm not sure if I'm not understanding documentation or I'm doing something wrong.

If I run the query
SELECT Id, 
     ApexTestClassId, 
     TestMethodName, 
     FlowVersionId, 
     NumElementsCovered, 
     NumElementsNotCovered 
 FROM FlowTestCoverage
I get the inforamtion of all Lightning flows that I have covereged. Howerver I'm confused with Elements fields. Reading this (https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_flowelementtestcoverage.htm) I understand that Elements are every single "box" on my flow, so if I have a visual flow like this one
User-added imageI would expect to get as a result the sum of NumElementsCovered and NumElementsNotCovered would be 4 (every single box on my flow) 

Same, if I run this query
SELECT Id, Elementname, FlowTestCoverageId 
FROM FlowElementTestCoverage 
WHERE FlowVersionId='theSFId'
I would also expect to get 4 records. Instead I get 1 record related to reservationEmail and first query returns also 1. 

Is it a misunderstanding on documentation? or Is it anything wrong on my org?

Thanks!



 
After creating a conection via External Data Source (Cross-Org one) and sync objects properly, now I would like to create a second External Data Source (Cross-Org too) that connect my org to a second one. But if I try to sync its objects, I get an error because I already have an External Object which API name is myExternalObject__x.

I have tried to mofidied this API name value to t1_myExternalObject__x but in that case, I cannot see this external object data properly. I get a pop up saying there is an error and after closing it another one: "You don't have access to this record. Ask your administrator for help or to request access."

If I rollback this api name change and just modify the label, it shows the data properly but my second connection doesn't sync.

Any idea how can I fix it?
Hi, 

Is it possible to edit my own answer? I realized about an error on it and want to fix asap.
I'm trying to check Visual flow (beta) functionality, and per documentation it seems we can use record Id in the flow, but I'm not able to make it work.

I have created a SObject variable
User-added image

From here I have created this variable with the Id (and similar one with Name)

User-added image
And also tried to use directly in my screen:

User-added image
But this is the result:
User-added image

Does anyone what am I missing?

Thanks!
Hi,
I have followed these instructions to install beta version in order to develop Lightning Components in eclipse, and I'm able to create a project and retrieve those files that I already created on this organization. However if I try to create one, I get this error message

User-added image

And afer clicking ok this one where field to set the name is blocked.

User-added image

I tried several times to set credentials just in case but no luck.

In addition, if I try to modify an existing component and click on "Save to Server" link, I get also this error:

User-added image

Any clue about this?

Thanks!!
 
Since a month ago, if I try to open Developer Forums on Chrome and try to login, I get below error messgae and logout. This is ok with Firefox.User-added image
I'm working on Lightning Component Basis T and I'm not able to get the style that is shown in the Trailhead.

I have followed these steps: https://trailhead.salesforce.com/lex_dev_lc_basics/lex_dev_lc_basics_prereqs and download latest version from here https://www.lightningdesignsystem.com/downloads/ , in my case 2.1.2.

However following steps, when I cretae the .app and used my static resource, the result is not the same.

This is the static resource:

User-added image

This is the code where I call the static resource
<aura:application >
 
    <!-- Include the SLDS static resource (adjust to match package version) -->
    <ltng:require styles="{!$Resource.SLDS212_1 +
         '/assets/styles/salesforce-lightning-design-system-ltng.css'}"/>

....

This is my result:

User-added image

And this is the expected one per trailhead:

User-added image

What am I missing?

Cheers
Is there a way to remove an "In Progress" Trailhead? I started with Spring'16 trailhead, but I didn't finish it. And now, after some months far away from the community, I tried to complete it but it is not available any more. And having it on my In Progress list is a kind of remembering that I lost my chance and I will never get this budget.
After creating a conection via External Data Source (Cross-Org one) and sync objects properly, now I would like to create a second External Data Source (Cross-Org too) that connect my org to a second one. But if I try to sync its objects, I get an error because I already have an External Object which API name is myExternalObject__x.

I have tried to mofidied this API name value to t1_myExternalObject__x but in that case, I cannot see this external object data properly. I get a pop up saying there is an error and after closing it another one: "You don't have access to this record. Ask your administrator for help or to request access."

If I rollback this api name change and just modify the label, it shows the data properly but my second connection doesn't sync.

Any idea how can I fix it?
Hi there,
My org has a PS and a Connected App and I would like to write a piece of code that do the assignment for me after installing a package. 

Running this piece of code from Dev Console, I get it work
SetupEntityAccess sea = new SetupEntityAccess(
   ParentId = ps.Id,
   SetupEntityId = connectedApp.Id
);
insert sea;

However it doesn't work from instalation script. In order to test it quickly I also created tab related to a VF page with a button that calls this code and it neither works.

I guess the reason is that Dev Console has more priviledges to run code rather than vf page or post instalation script. But I would like to find a way to make it work

Thanks!
Hi everybody,

Since the Winter'19, there are some things I really don't understand with "Flows" and Test corevage.

From Salesforce's doc here : https://sforce.co/2PqALZw

"For example, if you have 10 active autolaunched flows and processes, and 8 of them have test coverage, your org’s flow test coverage is 80%."

How can we test "Flows", or the real question is : How Salesforce test flow ?. How can I visualize if my flow is coreved.

This query below is used to know which of my flows are not covered.
SELECT Definition.DeveloperName
FROM Flow
WHERE Status = 'Active' 
   AND (ProcessType = 'AutolaunchedFlow' 
      OR ProcessType = 'Workflow' 
      OR ProcessType = 'CustomEvent' 
      OR ProcessType = 'InvocableProcess') 
   AND Id NOT IN (SELECT FlowVersionId FROM FlowTestCoverage)

When executing this query, Salesforce tells me that I have some flow not covered, but how can I cover them?
How Salesforce decide if my flow is covered or not ?

Thanks for your help :)
In Production, there are some Contact fields that do not display a Community Visualforce Page. Some details:
- Community is Visualforce + Tabs
- User's profile is a Customer Community User (custom) with Customer Community Login license
- Community Sharing Settings are User.Contact = ContactId on the Contact object
- The profile has Read/Edit access to the Contact object
- The profile has at least Read access on all fields (verified by checking isAccessible for the field)
- The Debug Log shows that the values are accessed, but then they do not display on the VF page
- If one of the fields that is not displaying is copied to a String variable, then that String value displays as expected on the VF page
- The fields that cannot be displayed are fields from a Managed Package

I have details I can send.

NOTE: A UAT full sandbox org was refreshed from Production. This issue does not occur in the UAT sandbox, only in the Production org.
I want to add a custom button in the CampaignMembers related list in the Campaign layout. I am adding it as a URL but it seems that I can't put in the Campaign Id as an argument.

User-added image

what do I need to do?
I use StandardController save method to save record like stdController.save();. 
My page has button to do async call (implemented using Queueable)  that updates 4 fields of that record. 
When user initiates action to invoke async method, system displays message with a way for user to refresh the fields and these fields are not editable.

It is not manadatory for user to refresh the data, and he may continue to edit the record and save.

As I use StandardController save method, and these fileds are present on page, and there is no method availabe to remove fields before save,
it is overwriting page data.

My requirement is, if Async call is completed, retain that data, and don't let page data to overwrite.

I don't want to write custom save method, but prevent overwriting.
Is there any way to indicate or remove fields from standardController before save, 
As addfileds method is present, I am looking for removefield method before save.



 
Hi All,

Looking to see if anyone can shed light on read/write access to the user Federation Identifier field.  The system I'm using is erroring out when attempting to perform a create.  It is saying to verify the read/write access to this field on the permission set or profile.  When I look into the object settings, the Federation ID field isn't there to allow or disallow.  Anyone have any insight on this?  Greatly appreciate any feedback.

Sam
I am creating a new Apex trigger in one sandbox, and I want to use the Debug Log to debug. I first create a new user trace flag. I put the Traced Entity Type as user and Traced Entity Name as my user name. Then I have the User-added image
this statement in my code. However, after I save the code, the log only shows this User-added image
Could anyone please tell me how to make the Debug Log work? Should I change the Traced Entity Type? Thanks in advance.
I have a scenario where i'm auto populating the values using javascript button (which further invokes an apex class). Now the real problem is when these fields are updated, it is invoking a trigger due to update operation.  Is there a way to prevent this?  In another words, Is there a way to bypass the trigger if the button is clicked?
Hi Team,

Can anyone help me to fix this issue to Batch Class for Contacts not related to Case ASAP?

Thanks & Regards,
Karthikeyan Chandran
Hi Expert,

Can you please suggest , how much questions will ask in Release examination of Admin and Developer-I . because my certification is near to expire.

So Please suggest.

Thanks
Mukesh
while inserting records into account if the phone number is duplicate then it will show an error and send email to account owner to modify the filed value .
how to write trigger for this .

Thanks,
Soubhagya
Hi All,

I am working on one scenario where there are Multiple Child Records for eg:Account is a parent and Under Account multiple child Objects Records will be there.In that child Object i have created one checkbox field called Primary and first record should be primary and if users adding another record as primary it has to thrwo error Message there is already one primary Record please unselect the existing record and add new record as primary marked
Eg:Let say under account 3 child records are there and 1 is primary already and user is trying to add the 3 rd record as primary it should throw error Message
NEXT There are 3 Multiple Child Records and one is primary among them and user is trying to delete the primary record without marking any other records as primary then it should throw error Message as User is trying to Delete primary Record without making another primary
If there is only one primary and user is trying to delete then it should allow the user to delete.
Note :Child Record Refers to Contact 
Any one please guide me to help to implement this scenarios.
Email manager class 

public class EmailManager {

    public void sendMail(string Address,string subject, string body)
    {
    Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
    string [] toaddress = new string[]{address};
    email.setToAddresses(toaddress);
    email.setSubject(subject);
    email.setPlainTextBody(body);
    }
}


developer console 
EmailManager e = new EmailManager();
e.sendMail('xxx@domain.com','test email', 'test apex');
  • September 05, 2015
  • Like
  • 0
Hi everyone,

We are working on a beta release for an AppExchange product, and I am installing the managed package in various dev orgs. I have noticed that if I select "Install for Admins Only" during setup, all elements are installed with access given only to System Administrator users, but if I later reinstall the same package and select "Install for All Users," nothing changes. If I install the package in a new org and select "Install for All Users," then all users are given access to the package. Is this how things are supposed to be?

Example:
I install the managed package and select "Install for Admins Only"
The field security for the custom field faxType on the Case object is set to Visible for the System Administrator profile only
I then reinstall the managed package and select "Install for All Users."
Salesforce gives the message "Installing and granting access for all users," but the field security on faxType remains Visible for System Administrators only.
If I want to grant all users access to the package, I have to first uninstall it.

I did a quick test by creating a small managed package with a single field, and I got the same results.

Is this right? If not, then what could be the reason for this behavior?
Exact replication steps:
1. Create a connected app
2. Add the callback URL to that connected app as the URL of a VF page. For Eg - 'https://c.eu2.visual.force.com/apex/mypage'.
3. Connect to another salesforce org of the same instance.Énter the login details ie username and password
4. Allow permission to the connected app create on your source org to access info about target org by clicking on Állow Button'
5. Instead of redirecting back to source org it redirects me to the target org and tries to open up the page mentioned in the callback url.
6. This issue is coming when my source and target org are on same instance. It works fine when source and target instances are different.
http://developerforce.github.io/lightning-connect-tutorial/create-lookup-relationships.html

Following the above Site I have created External LookUp relationship between "Orders and OrderDetails"
What my question is how OrderId in OrderDetail object is exactly mapping to OrderId in Order Object, even though i select Order object as External Lookup but i haven't selected OrderId field to map. How is it mapping?.

My requirement is
1.I have External Case and External Account objects.
2.Account have fileds ID, Name, etc..., Case have AccountId, CaseNumber..etc..,
3.Now i want create External LookUp relationship between AccountId field in CASE and ID field in Account
4.So, that Case should be related list of Account
 
 
  • July 02, 2015
  • Like
  • 1
If I am using lightning connect to bring data over from ERP (Great Plains) into Salesforce.  Could I render that data into a pdf using visualforce and apex?  
  • April 20, 2015
  • Like
  • 1
I have two external objects
EXT_Projects
EXT_Stores

I am trying to create a lookup from the Store to the Project. Both Objects have a field called ProjectID so I am trying to create an external lookup from EXT_Stores to EXT_Projects on that column. But when I try and retrieve the relationship it doesnt work and looking at the resulting data that new external lookup field is always empty? What is wrong? How do I get it populated?
Is it dependant on how the source tables are indexed - ie I dont currently have a foreign key relationship (even though this is what this is)

Please can someone help?
THanks
 Please could someone help advise the issue causing the Batch Apex Job DA_SnapshotUpsertBatch to abort.  There is not reason givem in the Apex Job Logs which would indicate a platform error...this job is critical to reporting analytics for us.