• Tiago Armando Coelho
  • NEWBIE
  • 40 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 17
    Likes Given
  • 3
    Questions
  • 57
    Replies
Help building a Lightning component\ quick action to get selected values from a list view.

An example in List View All Accounts have a quick action button call Set as Inactive. When we click on this button this will update all the select accounts to inactive.

Kind regards, 
Custom\ Standard Lightning component for Lookup fields?

Hi there, I would like to have a report with all events created with Salesforce for Outlook Plugin. 

Can anyone help me with this? 

Kind regards, 

I am trying to use the " Dynamically Update Flow Screen Fields " feature which was deliveried in spring 17. https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_forcecom_flow_fieldrules.htm. but I cannot field rule in my visual flow at all. the sandbox is in spring 18 release. any ideas?
Hello,

I'm new to Apex and need help writing a class or method that will call a .net web service when a user clicks on a custom button on the Loan record. Loan is a custom object as well. The class will need to query the Loan object and retrieve some fields from it as well as some fields from the related Account, and then call the .net web service and providing these fields to the service. We are using Lightning.

Thank you much!
Manuel Dangond
Hello,

I've been trying to build a VF page that will call a related opportunity record of an opportunity. The related record is being successfully pulled through but there's something missing in my save method and I cannot store inputs of the related record in the database. Can anyone offer some assistance? Here's my code below 

public class ClaimAndExtensionsROR {
    public ApexPages.StandardController std;
    
   Public Opportunity prclaim{get; set;}
   
   public ClaimAndExtensionsROR(ApexPages.StandardController stdCtrl) {
       
    std = stdCtrl;
    stdCtrl.addFields(new List<string>{'AccountId', 'Previous_Relevant_Claim__c'});  
    
     }
   
public Opportunity getOpportunity()
    {
     return (Opportunity) std.getRecord();
    }

public void PopulatedClaim(){
    
  if (null!=getOpportunity().Previous_Relevant_Claim__c && updateRelevantClaims())
         
         {
              Opportunity prclaim=(Opportunity) std.getRecord();
              prclaim.Previous_Relevant_Claim__r =[SELECT Id, Name, AccountId, FOS_Reference_Number__c, StageName, Opportunity_Sub_Stage__c, Submitted_to_FSCS_CB__c,
                                                  Submitted_to_FSCS_Date__c, SIPP__c, Financial_Advice__c, FSCS_Reference_Number__c, Previous_Relevant_Claim__c 
                                                  FROM Opportunity 
                                                  WHERE id=: prclaim.Previous_Relevant_Claim__c];
         

         }
                 
        }

     public PageReference save()
     {
     try{
     upsert prclaim.Previous_Relevant_Claim__r;
     upsert prclaim;
     }
     catch (Exception e){
         System.debug('Exception is =' +e.getMessage());
         }
     Boolean result=true;
     PageReference pr=Page.ROR_Questionnaire;

     if (result)
     {
        // call standard controller save, but don't capture the return value which will redirect to view page
        std.save();
           ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Changes saved'));
     }
        pr.getParameters().put('id', getOpportunity().id);
      
     return pr;
        }
}
Hey everyone, love this forum, received incredible help already a few times. 

Ran into a strange problem, as of yesterday when I click on contacts in Lightning my list view shows up like always, but when I click on a specific record, the lightning record page come sup blank. Literally nothing. I checked the setting and the specific lightning record page I created is the default for the org. Any idea what's going on?

Lightning Record Page coming up blank
Hi all, 
I have a Flow that I created to update a field on the Account object based if a checkbox is checked on another object. In testing, it seems that the collection variable is not clearing??

Here's my flow:
User-added image
And the PB workflow to launch the flow has the criteria of:
Primary Contact Checkbox Is changed = TRUE

So the requirement is:
If Contact A has Primary Contact checked, Account field should display Info from Contact A.
If Primary contact checkbox is False and changed to true for Contact B, account field should display info from Contact B.
and Vice-versa. Basically, if the account field should display only the info from the primary contact of the account.

Help!
 
Hi All,

I'm very much an SF newbie, so hopefully this makes sense...

When a new lead is created (via Web2Lead etc), we need some kind of internal process or trigger to run and match the Lead [Email Address], to the [Email Address] of an existing Contact. If there is a match, we need to return the Contacts parent Account [Name], and update the Lead [Company] field.

So if we already have an account for 'Test Co', with a Contact associated with it being 'Joe Bloggs / joe@bloggs.com', and then get a new Lead with the Email Address 'joe@bloggs.com', we need the Lead [Company] field to be automatically updated to show 'Test Co'. 

Is this possible? If so, can anyone point me towards the best way to achieve this. I've had a look at creating a process, but that doesn't seem to offer the options i need. Do we need some custom coding? If so, as someone with PHP/JS experience, what is the best route to take.

Many thanks.
Hi Guys, i got this error validating my Trigger

System.ListException: List index out of bounds: 1  Stack Trace: Class.CaseUtility.updateExpiredPoaLinks: line 582, column 1 Class.CaseUtilty_test.testUpdateExpiredPoaLinks: line 192, column

code below:
trigger t1 on Case (before insert, before update) {

 Group q = [SELECT Id FROM Group WHERE Name ='NCT queue' AND Type = 'Queue']; 

Contact con = new Contact(); 

for(Case cas : Trigger.New){

         if(cas.Court_Process__c == 'NCT'){

        cas.OwnerId = q.Id; 
    
       }
   }

 NCT__c nctNew = new NCT__c(Full_Name__c = con.cm1__Full_Name__c ); 

  insert nctNew; 
}


need help

Hi community,
I was helped by Jainam Contractor to write a trigger for Contact object, but can anybody help me to create test class and move it to production
I know I can do it with change sets, but it is a first time I am doing it and I have no idea how to do code coverege with tests.

Info about the trigger is here: https://developer.salesforce.com/forums/ForumsMain?id=9060G0000005Ttu 

Thanks in advance
Linas

Someone can help?
I have a pageBlockSectionItem to display a selectList and i should render another pageBlockSectionItem if some option of the list is selected("Dinâmica").
*Mudanca variable in visualforce page is the realizaMudanca in the controller

This is the pageBlockSectionItem of the list:
<apex:pageBlockSectionItem>
                                <apex:outputLabel value="Nova Fase do Candidato"/>
                                    <apex:selectList value="{!NovaFaseCandidato}" multiselect="false" size="1">
                                        <apex:actionSupport event="onchange" action="{!Change}" reRender="{!IF({Mudanca, "Blockteste", "")}"/>
                                        <apex:selectOptions value="{!FasesCandidato}"/>
                                    </apex:selectList>
                                    
</apex:pageBlockSectionItem>
*this is giving a syntax error, I don't know why

This is the function that i called in the controller
public PageReference Change() {

		if(NovaFaseCandidato == 'Dinâmica')
		{
			realizaMudanca = true;
			system.debug('true');
		}
		else
		{
			realizaMudanca = false;
			system.debug('false');
		}
		return null;
	}

This is the pageBlockSectionItem that i should render if "Dinâmica" is the option selected
 
</apex:pageBlockSectionItem>
                            
                            <apex:pageBlockSectionItem id="Blockteste" rendered = "{!Mudanca}">
                                <apex:outputLabel value="Selecione o painel"/>
                                    <apex:selectList value="{!DataHoraPainel}" styleClass="flutua-direita" multiselect="false" size="1">
                                        <apex:selectOptions value="{!QualPainel}"/>
                                    </apex:selectList>
                                    
                            </apex:pageBlockSectionItem>


 
Hi All,
Help me the increase the coverage of this class. Actually itg is at 40%

The test class is:
@IsTest
public class ContainerReportTest{
static testMethod  void containerReportTest (){
   
    Container__c cont = new Container__c ( Name = 'CMLU', Provenance__c='OTHER', Statut__c='Open');
          insert cont;
    
     Articles_Containers__c ac = new Articles_Containers__c();
          Product2 p = new Product2(Name ='TestProduct'); 
          insert p;
    
                 
          ac.Product__c=p.ID;
          ac.Unit_Weight__c = 45; 
          ac.Unit_Cost__c = 87;
          ac.Container__c= cont.ID;
          ac.Number__c = 55;
          ac.UM__c ='UNIT(S)';    
          ac.Local_ID__c = 7888;
          ac.Comments__c = 'UNIT(S)';
          ac.Purpose__c='Consignment';
          ac.Condition__c= 'New';
           
           insert ac;
    Account acc = new Account(Name = 'TestACC', Representant__c='TestBene', Departement__c='Ouest', Address__c='102, Test');
    insert acc;
    
    Delivery__c del = new Delivery__c();
        del.Beneficiaire__c = acc.Id;
        del.Ration__c =3;
        del.Delivery_status__c='Pending';
        
        insert del;
    
    Item_Distributed__c itemDis = new Item_Distributed__c();
    itemDis.Quantity__c = 44;
    itemDis.Product__c = ac.Id;
    itemDis.Delivery__c =del.Id;
    
    insert itemDis;
    
    ContainerReportController CRC = new ContainerReportController();
    
}

}


The Controller is:


public class ContainerReportController
{
    public Container__c container {get;set;}
    public Map<String,List<Item_Distributed__c>> itemDistributed{get;set;}
    String containerId;
    
    
          
    
     
    public ContainerReportController()
    {
        container = new Container__c();
        itemDistributed = new Map<String,List<Item_Distributed__c>>();
        
        try
        {
            containerId = ApexPages.currentPage().getParameters().get('id');
            
            container = [SELECT Id,Name,DR__c, PO__c,Arrived_Date__c, Invoice__c, Pkl__c, Description__c, Container__c.Provenance__c, Percent_Distributed__c, Bill_of_Lading__c, Size_in_feet__c, Seal_No__c, 
                         (SELECT Id,Name,Prod__c,Number__c,Number_Distributed__c,Available__c,UM__c, Pending__c, Percentagedistributed__c FROM Articles_Containers__r)
                         FROM Container__c WHERE Id =:containerId];
            
            if(container != null)
            {
                Set<Id> articleContainersId = new Set<Id>();
                
                if(!container.Articles_Containers__r.isEmpty())
                {
                    for(Articles_Containers__c art :container.Articles_Containers__r)
                    {
                        articleContainersId.add(art.Id);
                        itemDistributed.put(art.Id, new List<Item_Distributed__c>());
                    }
                }
                
                List<Item_Distributed__c> lstItemDistributed = new List<Item_Distributed__c>();
                
                lstItemDistributed = [SELECT Id, Name,Product__c,Quantity__c,Delivery__c,Productt__c, Beneficiary__c, Date__c   
                                      FROM Item_Distributed__c WHERE  Del_Status__c='Delivered'AND Product__c IN :articleContainersId];
                
                if(!lstItemDistributed.isEmpty())
                {
                    for(Item_Distributed__c item :lstItemDistributed)
                    {
                        if(itemDistributed.containsKey(item.Product__c))
                        {
                            itemDistributed.get(item.Product__c).add(item);
                        }
                    }
                }
            }         
        }
        catch(Exception e)
        {
            System.debug(e.getMessage());
        }
    }
}

 
Hi all, 
I have a Flow that I created to update a field on the Account object based if a checkbox is checked on another object. In testing, it seems that the collection variable is not clearing??

Here's my flow:
User-added image
And the PB workflow to launch the flow has the criteria of:
Primary Contact Checkbox Is changed = TRUE

So the requirement is:
If Contact A has Primary Contact checked, Account field should display Info from Contact A.
If Primary contact checkbox is False and changed to true for Contact B, account field should display info from Contact B.
and Vice-versa. Basically, if the account field should display only the info from the primary contact of the account.

Help!
 
Hi everybody, 

I'm trying to get a list in a lightning component. In the sandbox and in the community preview in my org i get a non empty list, but when i use the live version of my community, i get always an empty list for the same settings and same code. 
Can someone help? 

thanks, 
I am trying to save this component
<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable" access="global" >
    <c:auraMethod aura:id="child" />
    <aura:handler event="c:formsubmit" action="{!c.onFormSubmit}"/>
    
    
    
    <lightning:layout VerticalAlign="center">
        <lightning:layoutItem padding="around-small">
            <c:BoatSearchForm /> 
        </lightning:layoutItem>
    </lightning:layout>
    <lightning:layout VerticalAlign="center">
        <lightning:layoutItem padding="around-small">
            <c:BoatSearchResults />
        </lightning:layoutItem>
    </lightning:layout>
</aura:component>

 i have the error "No COMPONENT named markup://c:auraMethod found"

have you face this issue ?
 
  • March 13, 2018
  • Like
  • 2
Hi everybody,

when trying to use the "Add Account Team" Button on the Opportunity Team related List in Lightning, I am getting the follwoing error:

$Label.AddAccTeamOnOpp_SFX.addDefaultTeamTitleFail does not exist.
The parent Account's team members could not be added. Try again, or contact Salesforce for help

When using this button in classic, everything works fine. Any Ideas?
Hi All,

I have 2 triggers written on contact object. I need to make it to one trigger and retain the functionalities of both triggers. 
 
trigger DupePreventer on contact
                               (before insert, before update) {

    Map<String, contact> contactMap = new Map<String, contact>();
    for (contact contact : System.Trigger.new) {
        
        
        if ((contact.Email != null) &&
                (System.Trigger.isInsert ||
                (contact.Email != 
                    System.Trigger.oldMap.get(contact.Id).Email))) {
        
           
    
            if (contactMap.containsKey(contact.Email)) {
                contact.Email.addError('Another new contact has the '
                                    + 'same email address.');
            } else {
                contactMap.put(contact.Email, contact);
            }
       }
    }
    
 
    for (contact contact : [SELECT Email FROM contact
                      WHERE Email IN :contactMap.KeySet()]) {
        contact newcontact = contactMap.get(contact.Email);
        newcontact.Email.addError('A contact with this email '
                               + 'address already exists.');
    }
}
 
trigger DeactivateUser on Contact (before update) 
{
	
	Map<Id, Boolean> contactToActivateDeactivate = new Map<Id, Boolean>(); 
	
	
	for(Contact contact : trigger.new)
	{
		
		
		if (contact.Blacklisted__c != trigger.oldMap.get(contact.Id).Blacklisted__c)
		{
			
			contactToActivateDeactivate.put(contact.Id, !contact.Blacklisted__c);
		}
	}

	
	
	if (!contactToActivateDeactivate.IsEmpty())
	{
		activateDeactivateUser activateDeactivateUser = new activateDeactivateUser(); //referring to class
		activateDeactivateUser.updateUser(contactToActivateDeactivate);
	} 
}

Kindly provide me solution

Thanks,
Anuj​
Hi All,

I have a controller class which was previously written as without sharing. If I change it to with sharing will it have any impact?

Thanks,
Anuj
I've two methods that query on Account and a custom object, and I need values from both of them to initialize attributes on component. Can any one help to achieve this?

HI Folks 

I got strucked in code coverage, Now i have 63% coverage, Please do help. 

 

@RestResource(urlMapping='/api/IVR/*')

global class IVRRestAPI 
{
  
    @HttpPost
    global static List<IVR__c> CreateIVR(List<createIVR> icretIVR) 
    {
        try{
        Set<String> loanId = new Set<String>();
        List<Loan__c> loanlst = new List<Loan__c>();
        Map<String,String> mpidtoname = new Map<String,String>();
        List<IVR__c> IVRlst = new List<IVR__c>();
        for(createIVR icret:icretIVR)
        {
            if(icret.LoanID != null)
            {
                loanId.add(icret.LoanID);
            }
        }
        System.debug('loanId '+loanId);
        if(loanId.size() > 0)
        {
            loanlst = [SELECT Id,Name FROM Loan__c WHERE Name IN:loanId];
        }
        System.debug('loanlst '+loanlst);
        if(loanlst.size() > 0)
        {
            for(Loan__c iloan:loanlst)
            {
                mpidtoname.put(iloan.Name,iloan.Id);
            }
        }
        System.debug('mpidtoname '+mpidtoname);
        for(createIVR icret:icretIVR)
        {
            IVR__c IVR = new IVR__c();
                         
            if(mpidtoname.containskey(icret.LoanID))
            {
                IVR.Loan_Id__c = mpidtoname.get(icret.LoanID);
            }
            
            IVR.Name = icret.IVRId;
            IVR.Merchant_Name__c = icret.MerchantName; 
            IVR.IVR_Number__c = icret.IVRNumber;
            IVR.Disbursed_Amount__c = Decimal.valueOf(icret.DisbursedAmount);
            
            IVR.Disbursed_Date_Time__c = date.ValueOf(icret.DisbursedDateTime);
            IVRlst.add(IVR);
        }
        if(IVRlst.size() > 0)
        {
            insert IVRlst;
            return IVRlst;
        }
        return null;
        }catch(exception e){System.debug(e.getmessage() + e.getlinenumber());return null;}
    }
    global class createIVR
    {
        public String IVRId;
        public String LoanID;
        public String DisbursedAmount;
        public String MerchantName;
        Public String DisbursedDateTime;
        Public String IVRNumber;
        
        public createIVR(String IVRId,String LoanID,String DisbursedAmount,String MerchantName,String DisbursedDateTime,String IVRNumber){}
        
    }
}


Test Class ​

@istest
public class IVRRestAPITest{
 static testMethod void  IVRRestAPITest(){

   IVRRestAPI reqst=new IVRRestAPI();
   String JsonMsg=JSON.serialize(reqst);

   RestRequest req = new RestRequest();   
    req.addHeader('Content-Type', 'application/json'); 
    req.requestURI = '/services/apexrest/api/IVR/CreateIVR';
    req.httpMethod = 'POST';
    req.requestBody = Blob.valueof(JsonMsg);
    
    RestResponse res = new RestResponse();
    RestContext.request = req;
    RestContext.response= res;

    Test.startTest();
    List<IVRRestAPI.createIVR> icretIVRList  = new List<IVRRestAPI.createIVR>();
    icretIVRList.add(new IVRRestAPI.CreateIVR('Name','LoanID','DisbursedAmount','MerchantName','DisbursedDateTime','IVRNumber') );
    IVRRestAPI.CreateIVR(icretIVRList);
    Test.stopTest();
   }
}


Below lines are not covered in test class.

18                loanId.add(icret.LoanID);
24            loanlst = [SELECT Id,Name FROM Loan__c WHERE Name IN:loanId];
29            for(Loan__c iloan:loanlst)
30            {
31                mpidtoname.put(iloan.Name,iloan.Id);
41                IVR.Loan_Id__c = mpidtoname.get(icret.LoanID);
49            IVR.Disbursed_Date_Time__c = date.ValueOf(icret.DisbursedDateTime);
50            IVRlst.add(IVR);
51        }
52        if(IVRlst.size() > 0)
53        {
54            insert IVRlst;
55            return IVRlst;
56        }
57        return null;

 

Please do help to get code coverage. 
Thanks in Advance.

  • March 13, 2018
  • Like
  • 1
Hello,

i need a quick action button to export contact data as csv. I have created a visualforce page which is related to a quick action button. But it doesnt really work proper.
In Classis it shows the cvs-data on the page. In Lightning is just start the download of the file. I want to start the download only if the quick action button is clicked. How can i achiev this?

VF-Page
<apex:page standardController="Task" extensions="CtrlContactExport" contenttype="application/vnd.ms-excel#Export_Contacts.csv">RNAME1;RNAME2;RSTREET;RHHOUSENO;RPOSTAL;RCOUNTRY;RPHONE;REMAIL
    <apex:repeat value="{!list_contacts}" var="c" >
"{!c.Name}";"{!c.Salutation}";"{!c.MailingStreet}";"{!c.MailingStreet}";"{!c.MailingPostalCode}";"{!c.MailingCountry}";"{!c.Phone}";"{!c.Email}"
    </apex:repeat>
</apex:page>
Controller
public class CtrlContactExport {
    
    public list<Contact> list_contacts {get;set;}
    
    public CtrlContactExport (ApexPages.StandardController controller){

        exportContacts();
        
    }
    
    public Pagereference exportContacts(){
        list_contacts = [SELECT Name, Salutation, MailingStreet, MailingPostalCode, MailingCity, MailingCountry, Phone, Email FROM Contact];
        return new Pagereference('');
        
    }
 
}

Thanks for advice
Peter
 
We have a community and its having public access. we are trying to make the this site content as google searchable.  I have tried all the ways to verify the site by Google Console 
1. Using Meta data Tag
2. DNS 
3. HTML file 
4. Writing new VF page for Heager as 
<apex:page applyHtmlTag="false" applyBodyTag="false" showHeader="false">
<html>
<head> <meta name="google-site-verification" content="6gVRigIo4j09qSdIjONNEogH1YCIxxxfFITHPbZWnqM" />
<title> My title </title>
</head>
 </html>
</apex:page>

But still Im not able to verify my site in google web master tool.
Can any one help me to get my site verified by Google.
Appriciate your help.

Thanks
Nagesh
Hi..!,
on PHP site,there is a button called 'Go To Community',if i click on that button,it must be redirected to that related user's community landing page without asking credintials.how can i achieve this functionality?
I want to use 2 constructors within my Controller class, one for a VF component and another for VF page.is it possible to have the same SOQL within 2 constructors.Please give an example
Hi All,
Help me the increase the coverage of this class. Actually itg is at 40%

The test class is:
@IsTest
public class ContainerReportTest{
static testMethod  void containerReportTest (){
   
    Container__c cont = new Container__c ( Name = 'CMLU', Provenance__c='OTHER', Statut__c='Open');
          insert cont;
    
     Articles_Containers__c ac = new Articles_Containers__c();
          Product2 p = new Product2(Name ='TestProduct'); 
          insert p;
    
                 
          ac.Product__c=p.ID;
          ac.Unit_Weight__c = 45; 
          ac.Unit_Cost__c = 87;
          ac.Container__c= cont.ID;
          ac.Number__c = 55;
          ac.UM__c ='UNIT(S)';    
          ac.Local_ID__c = 7888;
          ac.Comments__c = 'UNIT(S)';
          ac.Purpose__c='Consignment';
          ac.Condition__c= 'New';
           
           insert ac;
    Account acc = new Account(Name = 'TestACC', Representant__c='TestBene', Departement__c='Ouest', Address__c='102, Test');
    insert acc;
    
    Delivery__c del = new Delivery__c();
        del.Beneficiaire__c = acc.Id;
        del.Ration__c =3;
        del.Delivery_status__c='Pending';
        
        insert del;
    
    Item_Distributed__c itemDis = new Item_Distributed__c();
    itemDis.Quantity__c = 44;
    itemDis.Product__c = ac.Id;
    itemDis.Delivery__c =del.Id;
    
    insert itemDis;
    
    ContainerReportController CRC = new ContainerReportController();
    
}

}


The Controller is:


public class ContainerReportController
{
    public Container__c container {get;set;}
    public Map<String,List<Item_Distributed__c>> itemDistributed{get;set;}
    String containerId;
    
    
          
    
     
    public ContainerReportController()
    {
        container = new Container__c();
        itemDistributed = new Map<String,List<Item_Distributed__c>>();
        
        try
        {
            containerId = ApexPages.currentPage().getParameters().get('id');
            
            container = [SELECT Id,Name,DR__c, PO__c,Arrived_Date__c, Invoice__c, Pkl__c, Description__c, Container__c.Provenance__c, Percent_Distributed__c, Bill_of_Lading__c, Size_in_feet__c, Seal_No__c, 
                         (SELECT Id,Name,Prod__c,Number__c,Number_Distributed__c,Available__c,UM__c, Pending__c, Percentagedistributed__c FROM Articles_Containers__r)
                         FROM Container__c WHERE Id =:containerId];
            
            if(container != null)
            {
                Set<Id> articleContainersId = new Set<Id>();
                
                if(!container.Articles_Containers__r.isEmpty())
                {
                    for(Articles_Containers__c art :container.Articles_Containers__r)
                    {
                        articleContainersId.add(art.Id);
                        itemDistributed.put(art.Id, new List<Item_Distributed__c>());
                    }
                }
                
                List<Item_Distributed__c> lstItemDistributed = new List<Item_Distributed__c>();
                
                lstItemDistributed = [SELECT Id, Name,Product__c,Quantity__c,Delivery__c,Productt__c, Beneficiary__c, Date__c   
                                      FROM Item_Distributed__c WHERE  Del_Status__c='Delivered'AND Product__c IN :articleContainersId];
                
                if(!lstItemDistributed.isEmpty())
                {
                    for(Item_Distributed__c item :lstItemDistributed)
                    {
                        if(itemDistributed.containsKey(item.Product__c))
                        {
                            itemDistributed.get(item.Product__c).add(item);
                        }
                    }
                }
            }         
        }
        catch(Exception e)
        {
            System.debug(e.getMessage());
        }
    }
}

 
In a child object, I have monthly revenue records. These records are exclusive to different operating companies. For a user, home operating company remains the same. For eg, a user whose home country is GBR has the following records.
IND - active
USA - active
GBR - Inactive.

I want to write a logic where if home country record is not active I want a checkbox to be false. When, home country is active I want to include other active countries. Below is my logic:
IF((FBO_Home_Operating_Company__c = text(OP_Company__c)) && (Current_Month_Active__c = TRUE),TRUE,FALSE) 

&& 

IF((FBO_Home_Operating_Company__c != text(OP_Company__c)) && (Current_Month_Active__c = TRUE), TRUE,FALSE)

It works when my home country is not active but it doesnot work when my home country is also active.
What am I doing wrong.
Please help me sorting out this issue.

Thanks
Sumanth
Hi All,

I am trying to load a barchart after pressing a button to load the most recent date inside a custom date field, keeping it dynamic. Is there any solution to do this inside of my controller that someone has implemented before?

Many thanks,
Ryan
I am learning Force.com Ide.
I am having some issues I created two deeloper accounts to practice. I was able to deploy some data from one org to another org but I was not able to delpoy reports and dashboards successfully. I was keep getting an error that the report folder is not shared with the user in this case its my user name. I recheck it was shared with my user name.
I was also following dreamforce video on youtube in which they were copying custom field from one object to another object in Force.com Ide. When I tried it didnt copied the field.
Please if someone can help me with this.  Any video tutorials or documentation that I can use to learn force.com Ide. 
Best Practice : When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.

User-added image


      That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it. 

Thanks #Copy_Steve Molis