• GauravGarg
  • PRO
  • 2815 Points
  • Member since 2015
  • Salesforce Developer
  • Unicolum / Rightpoint


  • Chatter
    Feed
  • 92
    Best Answers
  • 0
    Likes Received
  • 3
    Likes Given
  • 6
    Questions
  • 949
    Replies
Hi,

How to get the record type name in before insert.

Requiremnet is need to check in if condition for record type name 
Ex : if(record type name= 'A' ) 

We have a custom EmailService for inbound messages written in apex, which is processing Inbound email messages and then showing them in a lightning component.
The type od the received email object is EmailMessage. On the production org, when the system administrator is logged in, he sees all the needed incoming emails (the component is showing them as it should be, querying also works). It all worked well in our sandbox though.
The problem is when the user is logged in. The component does not show any emails and they are not visible also by querying. The problem is I suppose with some permissions, but the EmailMessage object in our org is not customizable when it comes to permissions (everything is set to default and is not changeable). The user has a company community licence. Any help or suggestion would be greatly appreciated.
HI All,

can anyone provide me a solution on how to update the ownerId field in the ContentDocument object. i have tried doing this with a trigger on ContentDocument object but it does not seems to work
Hi,

I have this trigger that I would like to convert to an apex class and I would like to add some code to the class.  The trigger changes contacts to the account owner id when the account owner is changed.  What I would like to add is something that also changes the contact owner when a contact is created or added to the account.

Here is the trigger I have.

trigger AlignContactownertoAccountOwner on Account (after insert,after update) {
      Set<Id> accountIds = new Set<Id>();
      Map<Id, String> oldOwnerIds = new Map<Id, String>();
      Map<Id, String> newOwnerIds = new Map<Id, String>();
      List<Contact> contactUpdates = new List<Contact>();
      for (Account a : Trigger.new)
      {
         if (a.OwnerId != Trigger.oldMap.get(a.Id).OwnerId)
         {
            oldOwnerIds.put(a.Id, Trigger.oldMap.get(a.Id).OwnerId);
            newOwnerIds.put(a.Id, a.OwnerId);
            accountIds.add(a.Id);

         }

      }

        if (!accountIds.isEmpty()) {

         for (Account acc : [SELECT Id, (SELECT Id, OwnerId FROM Contacts) FROM Account WHERE Id in :accountIds])

            {

            String newOwnerId = newOwnerIds.get(acc.Id);
            String oldOwnerId = oldOwnerIds.get(acc.Id);

            for (Contact c : acc.Contacts)

            {

               if (c.OwnerId == oldOwnerId)
               {

               Contact updatedContact = new Contact(Id = c.Id, OwnerId = newOwnerId);

               contactUpdates.add(updatedContact);

               }

            }

             

            }

       }
            update contactUpdates;

}

Any help would be great.

Thanks,

Michael 
Hello Devs, I have the following Trigger and Class that was working fine until this morning when I received the following error of Too Many future calls: 51. 

Any idea how to alleviate gettign this error?  Here is my trigger and class code....thank you all for any help you can provide....

Trigger:
 
trigger DeleteExtraBookingsTrigger on Opportunity (after insert) {

    For(Opportunity opps : Trigger.new){
        If(opps.Auto_Bookings__c == True){
            
            
        DeleteExtraBookingsClass.deleteRecords(Trigger.newMap.keySet());    
            
        }
    }
    
    
}

Class code:
 
public class DeleteExtraBookingsClass {

    @future
    public static void deleteRecords(Set<ID> oppIdsToDelete){
        List<Opportunity> opp = [SELECT ID, Armor_Product_Category__c From Opportunity WHERE ID IN : oppIdsToDelete AND Auto_Bookings__c = True
                                AND (Armor_Product_Category__c = null or Armor_Product_Category__c = 'Armor | null')];
        
        If(opp.size()>0){
        delete opp;
        database.emptyRecycleBin(opp);
        }
    }
    
}

Hello everyone.
I have a requirement to store information from different Contacts in Google Drive. My problem is that I would like to create a directory dynamically for each new contact and I have not found much information on how to do it from apex. Has anyone had success performing this functionality?

Greetings thank you!
Hi,

The below trigger was fired after updating the field twice, but it was not fired before update.
 
trigger age on Account (before update) {

  Map<Id,Account> ageMap = new Map<Id,Account>(); 
  Account[] acct = [SELECT Id,Age__c FROM Account WHERE Id IN : Trigger.newMap.keySet()];
    
     for(Account a : trigger.new){
           

            if(a.age__c != null){
             
                ageMap.get(a.Id);
                a.Is_Age_Updated__c = true;
               
            }
            else{
                
             ageMap.get(a.Id);
             a.Is_Age_Updated__c = false;
            }                  
    }

}


 
  • February 02, 2018
  • Like
  • 0
Hi All,
          I have two objects called product and product details. Product field is lookup on product details.
          In product details object, if I have a product detail record pd1 with product p1, I shouldn't be able to create or update 
          another product detail pd2 with product p1.
         
           How can I achieve this?
Hi,

    I have written a trigger .I want this trigger to be executed when clicked on a custom button in a VF page. Can anyone help me out with this?
Thanks.
What happens to the secondary master detail relationship if the primary master detail relationship is changed to lookup?
Hello,
I'm new to triggers and struggling with this. I need a trigger that pulls the Opportunity name and creates a new record in my custom object, AE Opp. I do not need it to create a lookup or link it to the opp, i just need it to create a whole new record so that I can create a task on it.. Is this feasible?
Hi all,

I'm new to Salesforce and would like to ask for more information about different salesforce editions and versions. Our team wants to use an organization, with Force.com account to be used as PaaS for custom application development. This means without the standard CRM features, which Salesforce.com provides like Campaigns, Leads, Opportunities, or Cases. But to get access to the “Core” functionality of Accounts and Contacts, Reports, Dashboards, Documents, and Activities and Custom Objects.  I know the Salesforce platform (https://www.salesforce.com/products/platform/lightning/?d=70130000000f27V&internal=true) can be used for this case. I have a free trial to test it out but still, it provides me features for Salesforce standard license, not for Salesforce platform license. Would please tell me which edition and licenses are best to be used when I want to use Force.com as a platform.
How to check whether two users are in the same queue in apex trigger?
  • January 08, 2018
  • Like
  • 0
Hello All,
I am an admin not a developer and I have written a simple before delete trigger and test class. The test is getting 80% coverage which is fine as I can deploy it, but for my own curiosity can anyone tell me how I can get 100% coverage please?

Thanks in advance

Trigger
trigger CheckGiftPledgeCount on Session__c (Before Delete) {
If(trigger.isBefore){
   If(Trigger.isDelete){
       for(Session__c a: trigger.old){
           if(a.TotalMembersRecruited__c>=1){
               a.adderror('You cannot delete a session if the count of total members recruited is greater than 0');
                 }
             }

        }
   }
}

Test Class
@isTest

private class CheckGiftPledgeCountTest{
     static testMethod void testTrigger(){
     Session__c ses = new Session__c() ;
     ses.Recruiter__c = '0035800000tXTlw';
     ses.Booking__c = 'a005800000K5yKl';

     insert ses;
     delete ses ;
     }
}

 
I am getting json data from an external webservice. The format of json data is as follows.
      Fullname=Michael$stone
      homephone=239923923 
I need to map the firstname and lastname to the Lead object standard fields.
so firstname=Michael and lastname=stone.

so my query is how to split the fulname in json data and then store into lead object fields.

Thanks
Smita B
 
I want to clone a record through Apex using a trigger to customize staging and update date fields.
I've run into two problems:

1. My original record isn't saved. I want the original record to save and a copy to be made from it. I'm looking for an automatic cloning action essentially.

The copy is known by the addage "planning" onto the name of the Opportunity.

2. The trigger is acting on all updates, meaning I can't change and save a field without activating the trigger. Do
I just need to change the parameters? Is there a way to check and limit with Trigger.Old?

Trigger that conditionally stages.
trigger FinancialPlanning on Opportunity (before update) {
 List<Opportunity> oppList = new List<Opportunity>();
    //creating list of opps in which items will live  
    for(Opportunity x : Trigger.new) {
          x.Name = x.Name + ' planning';
          
      
          if (x.StageName == '0 - Deferred'){
    			x.StageName = '1 - Research';
                x.Ask_Ready_Date__c = x.Ask_Ready_Date__c + 365;
                x.npsp__Ask_Date__c = x.npsp__Ask_Date__c + 365;
                x.Verbal_Date__c = x.Verbal_Date__c + 365; 
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
              
          }else if (x.StageName == '0 - Declined'){
                x.StageName = '1 - Research';
                x.Ask_Ready_Date__c = x.Ask_Ready_Date__c + 365;
                x.npsp__Ask_Date__c = x.npsp__Ask_Date__c + 365;
                x.Verbal_Date__c = x.Verbal_Date__c + 365; 
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
                
          }else if (x.StageName == '0 - Unresponsive') {
                x.StageName = '1 - Research';
                x.Ask_Ready_Date__c = x.Ask_Ready_Date__c + 365;
                x.npsp__Ask_Date__c = x.npsp__Ask_Date__c + 365;
                x.Verbal_Date__c = x.Verbal_Date__c + 365; 
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
               
          }else if (x.StageName == '1 - Research') {
				x.Ask_Ready_Date__c = x.Ask_Ready_Date__c + 365;
                x.npsp__Ask_Date__c = x.npsp__Ask_Date__c + 365;
                x.Verbal_Date__c = x.Verbal_Date__c + 365; 
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
               
          }else if (x.StageName == '2 - Intro'){
                x.Ask_Ready_Date__c = x.Ask_Ready_Date__c + 365;
                x.npsp__Ask_Date__c = x.npsp__Ask_Date__c + 365;
                x.Verbal_Date__c = x.Verbal_Date__c + 365; 
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
              
          }else if (x.StageName == '3 - Educate'){
                x.Ask_Ready_Date__c = x.Ask_Ready_Date__c + 365;
                x.npsp__Ask_Date__c = x.npsp__Ask_Date__c + 365;
                x.Verbal_Date__c = x.Verbal_Date__c + 365; 
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
              
          }else if (x.StageName == '4 - Ask Ready'){
                x.npsp__Ask_Date__c = x.npsp__Ask_Date__c + 365;
                x.Verbal_Date__c = x.Verbal_Date__c + 365; 
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
              
          }else if (x.StageName == '5 - Request'){
                x.Verbal_Date__c = x.Verbal_Date__c + 365; 
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
              
          }else if (x.StageName == '6 - Verbal'){
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
              
          }else if (x.StageName == '7 - Committed'){
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
              
          }else{
                x.Committed_Date__c = x.Committed_Date__c +365; 
                x.CloseDate = x.CloseDate + 365;
          }
          //get this picklist's value and update field with method. 
          x.Designated_Fiscal_Year__c = x.Designated_Fiscal_Year__c ; 
		  
        if (oppList.size() > 0) insert oppList;
            oppList.add(x);
      }
     
}
Here is what I've got in my controller class:
public class FinancialCloningController {
    //added an instance varaible for the standard controller
    private ApexPages.StandardController controller {get; set;}
    
    //instance for the variables being passed by id on the url
	private Opportunity opp {get;set;}
    
    //set the id of the record that is created
    public ID newRecordId {get;set;}
    
    public FinancialCloningController(ApexPages.StandardController controller) {
        this.opp = (Opportunity)controller.getRecord();
        this.controller = controller;
        opp = (Opportunity)controller.getRecord(); 
         
    }
    
    public PageReference cloneOpportunity() {

         // setup the save point for rollback
         Savepoint sp = Database.setSavepoint();
         Opportunity newOpp;

         try{

             //Copy the Opportunity - only include the records you want to clone 
             opp = [SELECT Id, Name, StageName FROM Opportunity WHERE ID = :opp.id];
             insert newOpp;
             newOpp.clone(false, false, false, false);

             //set the id of the new po created for testing
             newRecordId = newOpp.id;
             

         } catch (Exception e){
             // roll everything back in case of error
            Database.rollback(sp);
            ApexPages.addMessages(e);
            return null;
         }

          return new PageReference('/'+newOpp.id+'/e?retURL=%2F'+newOpp.id);
        
    }

}
I'm not sure that I can isolate a triggers actions to a button. Obviously, I'm very new to Salesforce and don't know if there is a way to do this without triggers. I feel the trigger is too powerful in this case. Why is the original record saving as a new record (conditional logic is fine and works), and can this trigger be isolated to a button action?

Thanks.





 
Hello Team,
I want to add one more field to the below SOQL.  This field  "Name" is coming from a different Entity. Not sure how can I go about this

Field to add: Name   , Table: TBC_Verticals__c

SELECT Name,
    (SELECT UnitPrice FROM OpportunitylineItems) ,
    (SELECT Revenue__c FROM Opportunity_Line_Item_facts__r) ,
    FROM opportunity

  
Hi,
How can I align page block table title into centre

<apex:pageblock title="Main title"> 

title in page block want show in center, how to do this?
Please help me

Thanks in Advance
Hi All,

I am new to lightning. My requirement is to load external Minify javascript file which will run a demo or walkthru over the object records, Dashboard to enlight customer to use Lightning. 

Currently, the same has been working in salesforce classic, but in lightning it is not allowed and throwing error. 

Do anyone facing the same issue? 
My client require to have two way integration between Salesforce - Siebel. 

Is there any third party (app exchange) tool. 
Or we should go with customized code. 

Please suggest. 
I want to create Opportunity Share records for two custom fields "Manager" and "Senior Manager"  lookup to User on Opportunity object. 

My Batch job is working as expected and creating those record perfectly. 

But, the issue is in Test Class:
  • I have created one createOpportunity() method, and create two Opportunities. 
  • Both the opportunities have Manager / Senior Manager field populated with User. 
  • Now, when I run this method, It will cover my Batch job and create sharing records ( that I can debug in batch job).
  • If I am trying to query those sharing record in Test Class using below query, it is giving 0 records. 
  • SELECT Id, manager__c, senior_manager__c, rowcause from Opportunity. 
Any ideas please. 
We have some VF page, that we visible as Public Site on my client website. The VF page are working fine but due to salesforce Standard Javascripts. The website perform is quite down. 

Can you please provide me some idea to avoid running these standard Javascript libraries. 

 
Hi All,

I have completed my Lightning Superbadge two months ago and since then it is showing in active module. Please help me out how can I fix this. I already had contacted with salesforce trailhead but they are providing no help. 

Thanks,
Gaurav
Hi All,

Today I have completed my Lightning super badge module, still it is showing under Active module.

User-added image

Please suggest how can I fix this. 

Thanks,
Gaurav
Hi,
This may be silly but this is what we want to do:

Add a radio button that is color red, on click it would turn green. If the status of the case does not equal "close" by a specific time (lets say 11:59pm) the button will turn back to red. All these actions will be recorded in the history of the case.

The button will be located in the section where "Priority", "Status", and "Case Number" are currently at.

User-added image

I hope someone can help me :)
Hi there, my company hase the Professional Edition of Salesforse and I can't make any Apex Classes and Triggers. Here and here is written that it's possible to make a package and the install it into Professional Edition. 

I've made a package in Development Edition but when I tried to install it shows:
"
This app can't be installed.
There are problems that prevent this package from being installed.
Apex Classes(classes/AbelProductUpdateTriggerTest.cls-meta.xml) Missing feature
Installing this package requires the following feature and its associated permissions: Apex Classes
Apex Triggers(triggers/AbelProductUpdateTrigger.trigger) Missing feature
Installing this package requires the following feature and its associated permissions: Apex Triggers

"
So I can't understand is it possible or not?

Yhanks.
 
Hi ... We have customers who send documents for review using email-to-case.  The documents come as email attachments which land on the case - attachment related list.  We would like to send an automated email referencing the attached document using workflow rules.  The workflow rule works with the exception of including the document in the reply.  Here's what I'm using for my VF page, but it's not pulling the attachments

<messaging:emailTemplate subject="Testing Attachment Lists" recipientType="Contact" relatedToType="Case">
<messaging:plainTextEmailBody >
Thank you for your email regarding the attached document(s).  We will review your document and reply shortly.  
<apex:relatedList list="Attachments" />
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
I have a requirement like In a VF page Radiobutton:Yes & no is there ,on selecting Yes it should display contact related fields in same page.please help me!!
 
Hello,

I have a field named, Last_payment__c (date field), is there any possibility to trigger an email if that mentioned field hasn't been updated for a numbers of days? Lets say 7 days. Please advise.

Thanks
HI Guys ,

I will try to updated the existing user record . Here is the my sample code ,
  HttpClient client = new HttpClient();
            string requestMessage = "{\"NewPassword\":\"sv0xHAuM\"}";


            HttpContent content = new StringContent(requestMessage, Encoding.UTF8, "application/json");
            //string requestMessage = "<root><name>DevForce21</name><accountnumber>8994432</accountnumber></root>";
            //HttpContent content = new StringContent(requestMessage, Encoding.UTF8, "application/xml");
            string uri = InstanceUrl + API_ENDPOINT + "sobjects/User/0057F000002uZLMQA2" + "?_HttpMethod=PATCH";

            //create request message associated with POST verb
            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Put, uri);

            //add token to header
            request.Headers.Add("Authorization", "Bearer " + AuthToken);

            //return xml to the caller
            request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            request.Content = content;
            var response = client.SendAsync(request).Result;
            return response.Content.ReadAsStringAsync().Result;         
.I am getting the error "Method Not allowed ".

Kindly advice to fix this issue.
Hi together, 

i have a process builder process for contacts to create a junction object record between contacts and custom object. For the Junction Object i created also a workflow to prevent them from creating duplicates like explained here: https://salesforce.stackexchange.com/questions/12755/how-to-apply-uniqueness-on-junction-object

Now i will update for example 50 contact records through an import and for all of them a junction record will be created through the process builder, if there is no duplicate it works fine, but if it founds only one junction record duplicate through the workflow it will fail also for all other records.

Hope you understand my question and can help me out of that. 

Best regards
Sascha
I have 3 users i want to fetch 10 records from Account object and assign first 3 records to first user next 3 records 2nd user another 3 records to 3rd user and again it will go to 1st user to assign another record how to do that can any one help me in that.
my code is below 

batch class:

global class Batch_Example_3 implements Database.Batchable<sobject>,Database.Stateful {
    global Static Integer count;
  global  Database.QueryLocator Start(Database.BatchableContext bc){
        String s='select name,ownerid from Account  limit 10';
        return database.getQueryLocator(s);
                                
 }
    global void execute(Database.BatchableContext bc,List<Account> accs){
        count=0;
        List<User> myuser=[select id from user limit 3];
        
        for(user u:myuser){
           for(Account a:accs){
            a.OwnerId=u.id;
              count+=1;
               update a;
        
        
        }
        
        }
        
        //update accs;
        
    }
    global void finish(Database.BatchableContext bc){
        
    }

}

execution:
Batch_Example_3 ba=new Batch_Example_3();
Id JobId=database.executeBatch(ba,1);

 
I am planning to build a Lightning Component form and expose it using force.com sites. The respondents should be able to save progress and resume later. can anybody give pointers how this can be achieved?

Thanks,
Vandana
In a trigger we are creating accounts and/or contact when the records are created. These input value may have Unicode characters. What is the best way to handle such data? I am currently using String class to store/pass data around. For example currently  "jörg" is transformed to 
"jã¶rg", how do I avoid this behavior.
Hi,
I want to calculate number of records per status field value for the custom object. I want to calculate these records on daily basis. For that i have created the summary report and grouping data based on status field. One of the option i am working is Analytical Snapshots. but not getting results as expected.
Please Help...!!!
Hi,

How to get the record type name in before insert.

Requiremnet is need to check in if condition for record type name 
Ex : if(record type name= 'A' ) 
Hi, everyone
I am doing an http request to get an access token by providing username ,password+securitytoken,clientid and client secret.
when i am keeping my password without '%' character,I get an json object in return and i can retrieve access token from there.
But when i am keeping my password containing '%', i donot get any access token,instead i get following response from salesforce:
HttpResponseProxy{HTTP/1.1 500 Server Error [Set-Cookie: BrowserId=xsLele0JRxq3iMSEHJEOfQ;Path=/;Domain=.salesforce.com;Expires=Sun, 06-May-2018 08:52:16 GMT;Max-Age=5184000, Strict-Transport-Security: max-age=31536000; includeSubDomains, X-Content-Type-Options: nosniff, X-XSS-Protection: 1; mode=block, Content-Security-Policy: upgrade-insecure-requests , Cache-Control: no-cache,must-revalidate,max-age=0,no-store,private, Content-Type: text/html; charset=UTF-8, Connection: close] ResponseEntityProxy{[Content-Type: text/html; charset=UTF-8,Chunked: false]}}

<html>
<head><title>An internal server error has occurred</title></head>
<body>


<div style="display:none;" id="errorTitle">An internal server error has occurred</div>
<div style="display:none;" id="errorDesc">An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact <a href="https://help.salesforce.com/apex/hthome">Salesforce Support</a>. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. <br/><br/>Thank you again for your patience and assistance. And thanks for using salesforce.com!</div>
<table cellspacing=10>
<tr><td><span style="font-weight: bold; font-size: 12pt;">An internal server error has occurred</span></td></tr>
<tr><td>
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact <a href="https://help.salesforce.com/apex/hthome">Salesforce Support</a>. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. <br/><br/>Thank you again for your patience and assistance. And thanks for using salesforce.com!
<br><br>
Error ID: 918501765-6908 (790378106)
</td>
</tr>
<tr><td>
<br clear="all"><br><br>


</td></tr>
</table>

</td></tr>
</table>



</body>
</html> 


If someone has faced this issue. Then kindly share the solution.Thanks for you time .
Hi Guys,
I need to get the Name of the Territory to assign it to a field, but when I try it, it generates an error.

this is my code:

 List<UserTerritory> myList = [SELECT Id, UserId, TerritoryId 
                                      FROM UserTerritory 
                                      WHERE UserId = :UserInfo.getUserId()];
        
        Set<Id> territoryIds = new Set<Id>();
        for(UserTerritory terr : myList) {
         territoryIds.add(terr.TerritoryId);
        }
        
        List<Territory> territoryN = new List<Territory>([SELECT Id, Name
                                                             FROM Territory
                                                             WHERE Id = :territoryIds LIMIT 1]);

        System.debug('NAME TERRITORY******' + territoryN.Name);

in the System.Debug I need view the Name (territoryN.Name)  and the error is "Variable does not exist: Name"

Please help me 

Sorry, first off I'm not a developer so please go gentle with me. We are currently trying to intergrate another tool with our SF org and we need 75% code coverage to get the intergration to run. Currently we only have 46% code coverage.

What is annoying here, is we haven't done any delopement ourselves, and are held back with four apex classes that we can't find anyway of deleting. They are:

supersort - code coverage 0%
TrialCustomerPortalHomePageController - code coverage 0%
ChatterAnswers - code coverage 0%
ChatterAnswersEsculationTriggerTest. - code coverage 33%

They are all on Api version 27.0 and were in the system when we started using SF back in July '17. Can anyone help us either get rid of them, (if indeed they shouldn't be there) or just help us get the code coverage up to 75%.

I have tried looking at various tools like Force IDE and Workbench, but what ever I try they remain. Have also raised a case with SF support, but they keep saying it's a devloper issue and closed the case.(twice)

Hopefully there is a simple answer to this. 

Need Urgent Help,

Actually, the scenario is I have a currency field in Account as well as in Opportunity.
and Account is mapped with Opportunity.

whenever my account selects the Currency Record type as  USD then the Account's currency fields (ABC__c) = $1000.00 shows a value correct.

but while creating the opportunity I'll select this account as a lookup. and some fields are already mapped.
but such scenario my opportunity's  Currency Record type is UAE when I save my opportunity than the value of account's Field (ABC__c) doesn't get converted.
Still, it shows a value of $1000 didn't get converted to UAE 


Please HELP ME FROM THIS SITUATION.

Many Thanks in Advance.
 

I was planning to bring in data from an external database and found that it will cost us 13+GB of storage. The data has more than 7 million records across 4 tables, so at 2kb per record, the total cost would be 7000000*2/(1024*1024) = 13.4 GB. We would like to search and report on the data and add associated contacts and accounts to campaigns. What are our options?  
Hello Everyone, Hope all are doing good i have some information for you all go through it and give me a reply for that!

Amazon EC2 (AWS Certified)is an Infrastructure as a Service which offers pay-by-hour servers (EC2), storage (S3) etc. You bring your own software to the table – OS (Red Hat, Windows, whatever), Database (MySQL, Oracle, DB2, whatever), Search (your pick), Business Intelligence (Cognos, Oracle BI, whatever) – and then you piece it together and get it all to work. The benefits are that you can do whatever you want – and the con is you have to manage complexity yourself.

Force.com, by contrast, is a Platform as a Service that provides a pre-integrated offering that already has a database, search, BI Reports, identity/security etc. all built in – that you program using a Java-like language (Apex). With the newly announced VMforce, a VMware and Salesforce.com offering, you will be able to use Java soon. Force.com automatically backs up your data, manages upgrades (your apps don’t need to know if Force.com is running on database version 11i or 11g, Dell boxes or Sun boxes, Linux or Windows etc.)

Regards
Sarahjohn
{!REQUIRESCRIPT("/xdomain/xdomain.js")}
{!REQUIRESCRIPT("/soap/ajax/39.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/39.0/apex.js")}
{!REQUIRESCRIPT("/support/console/39.0/integration.js")}

var Program='{!Program_Member_MVN__c.Program_Name__c}';
var Pname=sforce.connection.query("Select Program__c from Program_Names__c");
var rec16 = Pname.getArray('records');
var status='{!Program_Member_MVN__c.Status_MVN__c}';
var PmId='{!JSENCODE(Program_Member_MVN__c.Id)}'; 
var PName='{!Program_Member_MVN__c.Program_Name__c}'; 
var url;
if (sforce.console.isInConsole()) {
if(Program == rec16){
alert("You are on the wrong Program")
} 

else if(status == 'On Therapy')
{
url = "/apex/Milestone_skip?id="+PmId;
window.open(url,'_blank','toolbar=0,location=0,menubar=0,width=800,scrollbars'); 
}  
else
{
alert("Patient must be ‘On-Therapy’ before skipping to a milestone");
}
}

This is my java script on click button code.In this i am querying  custom setting here:var Pname=sforce.connection.query("Select Program__c from Program_Names__c");
And i want to compare to field to show a alert.So i have to multiple values in custom setting.So how can i access all the values given in the custom setting in the java script code?