• hramani
  • NEWBIE
  • 20 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 66
    Questions
  • 18
    Replies
I have a requirement where I have a field named 'Product__c' from where I need to pick the characters starting from ';' to the end of line and populate that on another field named 'Latest_Product__c'
I need to do it in a Salesforce formula on a Process builder.
e.g. 
Product__c = Chair;Table
I need to write a formula to pick only 'Table'

Product__c = Chair;Table;Sofa
I need to write a formula to pick only 'Sofa'

Can someone help please.
In Lightning, on the Approval requests tab , when I click on the arrow next to Approval Requests ,I see an indication saying 'No recent records to show' though I have seen a few records from that list available for Approval.
Is it a default behaviour of Salesforce that cannot be changed?
Please help.User-added image
I need to update 'Mobile User' field for all the Users. I didn't see this field exposed to API in Workbench or Data Loader.
I saw that a few articles said that 'UserPermissionsMobileUser' field can be used. But it didn't help.

Can someone help and clarify if there is a way to bulk Update 'Mobile User' field for all the Users at once ?
Please help.
I have an Approval Process being called from a Process builder.
I have a User belonging to a specific profile (Let's say 'Marketing' Profile). That profile on a specific object, (Let's call it 'Nomination__c') has Read,Create,Edit,Delete and View All permission. It doesn't have Modify All permission.

I have an Approval Process written on the Nomination__c Object. It really doesn't have any particular entry criteria. I'm calling this Approval process from a Process builder (skipping the entry criteria) so that I don't have to click on the 'Submit for Approval'.

When I create a Nomination__c record logging in as a Marketing Profile user, I'm getting an error saying "Error Occurred During Flow "Nomination_Approval_Flow": No applicable approval process was found." 

Is it because I dont have 'Modify All' permission on Marketing Profile?

Can someone help please.
Can I have the scenario where I can have two records with the same Salesforce Ids with different cases. 
e.g. 
a124T000000kDCa   -- Ajay
a124t000000KDca   -- Hari 

The above is an example of 15 digit Id. Is this scenario possible ?
Is the same scenario possible with 18 digit Ids as well.

Please help.
I have a VF component which has a controller where I’m calculating the no of records and storing the value in an Integer (get set) named resultCount.
I want to display that based on a condition something like     
1. if results are 50, show “Displaying first 50 results”
2. if results are less than 50, show “Displaying N results” (N is the exact number found)

For this I’m using the below statement, but it is not working,
Can someone help please.

<apex:outputLabel value="{!IF(!resultCount < 50,’Displaying {!resultCount} Results’,’Displaying first {!resultCount} Results')}" />

 
  • September 05, 2019
  • Like
  • 0

When the VF loads, I want the page to display the total record count.  
e.g. Assuming App_Process__c is a Custom Object:
VF Page load result:

Total Number of App Forms : 200

Can someone help me with a simple example.
  • September 03, 2019
  • Like
  • 0
I have a VF page which contains a lot of fields with the helpText option. In the VF page, the helpText functionality is achieved using the below code.
When this page is opened in the lightning interface, the helptext option appears but when I place my mouse on the ‘?’ mark nothing appears.
Please help.


        <apex:outputPanel >
                    <apex:outputLabel >Start Date</apex:outputLabel>
                    <apex:outputPanel >
                        <span class="helpButton" id="startDate-_help"><img src="/s.gif" alt="" class="helpOrb" title=""/></span>
                       <div class="myHelpText">Please enter the start date and time for this {!classificationLabelLowerCase}</div> -->
             <script  type="text/javascript">sfdcPage.setHelp('startDate', 'Please enter the start date and time for this {!classificationLabelLowerCase}');</script>
                    </apex:outputPanel>
                </apex:outputPanel>
Is there any way where we can keep the Require HttpOnly attribute in session settings enabled (set to true) and still have the cookies access via Javascript ?
I get the below error while loading a VF page. VF page’s extension is ‘ApplicationReaderController’ which contains a remote action named ‘getMergedPdfUrlWithCookie’.

{"statusCode":400,"type":"exception","ref":false,"action":"Unknown","method":"Unknown","message":"Method 'getMergedPdfUrlWithCookie' not found on controller TargetX_Reader.ApplicationReaderController. Check spelling, method exists, and/or method is RemoteAction annotated.","where":"","data":"","vfTx":true,"vfDbg":true,"tid":6,"result":null,"status":false}

Initially when I loaded the page, I didn’t get this error but when I set the ‘Require HttpOnly attribute’ to true, I got the error. Now I set the Require HttpOnly attribute value to false and then load the page again and I get the error. I refresh the page number of times, I still get that error. I also tried switching that setting (Require HttpOnly attribute) back and forth and I constantly get that error.

Can someone help me with the reason and the solution please.


 

In the below code, in the second line, I get an error System.NullPointerException: Attempt to de-reference a null object
Please help.

for (Application_Review__c ar : Trigger.new) {
            if (String.isNotBlank(arts.get(ar.Application_Review_Type__c).iPad_Configuration__c)) {
                reviewIds.add(ar.Id);
            }
        }
If a class extends to another class, should we separate test class for both or one test class is good enough to cover both the classes?

e.g.
public class ApplicationFormParseJSON extends ApplicationForm
{
// operation happens
}
Another Class :
public virtual class ApplicationForm
{
// operation happens
}

Do I need to write separate Test for the virtual class ApplicationForm ? or ApplicationFormParseJSONTest will be good enough?
I have method, I need Test coverage for it. It contains JSON.createParser and I'm not sure how to cover all these Json in the test class,
Can you please help.

private void cardsInAppType(String strAppType)
  {
    List<Application_Process__c> apList = new List<Application_Process__c>();
    Application_Process__c ap = new Application_Process__c();
    formsList = new List<Form>();

     if (strAppType != NULL)
    {
      apList = [SELECT id, Name, Configuration__c, Reusable__c
            FROM Application_Process__c
            WHERE id = :strAppType LIMIT 1];

      if (apList.size() > 0)
      {
        ap = apList[0];

        String JSONContent = ap.Configuration__c;

        if (JSONContent != NULL)
        {
          JSONParser parser = JSON.createParser('{}');
          Form f = new Form(parser, ap.name, ap.id, ap.Reusable__c);

          try {
            parser = JSON.createParser(JSONContent);

            f = new Form(parser, ap.name, ap.id, ap.Reusable__c);
          }
          catch (System.JSONException e) {
            parser = JSON.createParser('{}');
            f = new Form(parser, ap.name + ' ---- Error in Configuration', ap.id, ap.Reusable__c);
            System.debug(' JSON Exception on : ERROR: ' + e.getMessage());
          }

          formsList.add(f);

          if (f.sectionsList != NULL && f.sectionsList.size() > 0)
          {
            for (Integer x = 0; x < f.sectionsList.size(); x++)
            {
              Section s = f.sectionsList[x];

              if (s.cardsList != NULL && s.cardsList.size() > 0)
              {
                for (Integer y = 0; y < s.cardsList.size(); y++)
                {
                  Card c = s.cardsList[y];

                  if (c.formId != NULL)
                  {
                    List<Application_Process__c> cardList = new List<Application_Process__c>();
                    Application_Process__c card = new Application_Process__c();
                    cardList = [SELECT id, Name, Configuration__c, Reusable__c
                          FROM Application_Process__c
                          WHERE id = :c.formId LIMIT 1];

                    if (cardList.size() > 0)
                    {
                      addFormsTolist(cardList);

                      /*card = cardList[0];
                      
                      String JSONContent2 = card.Configuration__c;

                      if (JSONContent2 != NULL)
                      {
                        JSONParser parser2 = JSON.createParser(JSONContent2);
                        formsList.add(new Form(parser2, card.name, card.id, card.Reusable__c));
                      }*/
                    }
                    else
                    {
                      s.cardsList[y].label = s.cardsList[y].label + ' ---- Form Does Not Exist';
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
I have the below code and its test class.
There are two lines that are not getting covered in the Test class. Please help me.

CLASS

global without sharing class RecommendationEmailUpdate {

    @RemoteAction
    global static List<TargetX_SRMb__Recommendation__c> getRecommendations(String applicationId){
        List<TargetX_SRMb__Recommendation__c> recommendations = [Select Id, EmailSent__c, TargetX_SRMb__Application__c  from TargetX_SRMb__Recommendation__c where TargetX_SRMb__Application__c = :applicationId];
        return recommendations;
    } 

    public void recommendationEmailFieldUpdate(List<TargetX_SRMb__Recommendation__c> recList){
        List<TargetX_SRMb__Recommendation__c> recLists = new List<TargetX_SRMb__Recommendation__c> ();
        for(TargetX_SRMb__Recommendation__c recVal : recList) {
            recVal.EmailSent__c = 'Yes';
            recLists.add(recVal);
        }
        update recLists;
    }
}


TEST CLASS

@isTest
private class RecommendationEmailUpdateTest {

    @testSetup 
    static void setup() {
        List<TargetX_SRMb__Recommendation__c> recLists = new List<TargetX_SRMb__Recommendation__c> ();
        Contact con = new Contact();
        con.LastName = 'TestContact';
        insert con;
        TargetX_SRMb__Application__c app = new TargetX_SRMb__Application__c();
        app.TargetX_SRMb__Contact__c = con.Id;
        insert app;
        for (Integer i = 0; i < 2; i++ ) {
            TargetX_SRMb__Recommendation__c rec = new TargetX_SRMb__Recommendation__c();
            rec.Name = 'RecommendationTest'+i;
            rec.TargetX_SRMb__Email__c = 'test'+i+'@test.com';
            rec.TargetX_SRMb__Contact__c = con.Id;
            rec.TargetX_SRMb__Application__c = app.Id;
        }
        insert recLists;
    }

    private static testMethod void getRecommendationsTest() {
        TargetX_SRMb__Application__c application = [Select Id from TargetX_SRMb__Application__c limit 1];
        String applicationId = String.ValueOf(application.Id);
    
        Test.startTest();
        RecommendationEmailUpdate.getRecommendations(applicationId);
        Test.stopTest();  
    }
    
    private static testMethod void recommendationEmailFieldUpdateTest() {
        List<TargetX_SRMb__Recommendation__c> recommendations = [Select Id, EmailSent__c from TargetX_SRMb__Recommendation__c];
        Test.startTest();
        RecommendationEmailUpdate emailFieldUpdate = new RecommendationEmailUpdate();
        emailFieldUpdate.recommendationEmailFieldUpdate(recommendations);
        Test.stopTest();
    } 
}


TWO LINES  NOT GETTING COVERED ARE :

recVal.EmailSent__c = 'Yes';
recLists.add(recVal);



 
global without sharing class RecommendationEmailUpdate {

    @RemoteAction
    global static List<TargetX_SRMb__Recommendation__c> getRecommendations(String applicationId){
        List<TargetX_SRMb__Recommendation__c> recommendations = [Select Id, Mail__c, TargetX_SRMb__Application__c from TargetX_SRMb__Recommendation__c where TargetX_SRMb__Application__c = :applicationId];
        return recommendations;
    }
}

In this code, I'm getting the below error while compiling.
Error: Compile Error: Invalid identifier ' getRecommendations'. Apex identifiers must start with an ASCII letter (a-z or A-Z) followed by any number of ASCII letters (a-z or A-Z), digits (0 - 9), '$', '_'. at line 4 column 56

Please help
 
There is a Salesforce bug resolved recently (a couple of days ago) The Bug is https://success.salesforce.com/issues_view?id=a1p3A000001FSmyQAG
In this page (https://success.salesforce.com/issues_view?id=a1p3A000001FSmyQAG) saying that the Bug is fixed, I see that it is mentioned that it is fixed on a lot of nodes (domains) like AP, CS, NA and UM.
I have a scratch org with a random domain name namely ‘https://customer-java-5244-dev-ed.cs65.my.salesforce.com/home/home.jsp’.

Will this Bug be resolved in my scratch org as well?
I have a VF page pulling a field set and displaying the data from the fields present in the field set.
In the below code the field set ‘Essay_Cover_Sheet’ contains a text area field named ‘Essay_Body__c’. Essay_Body__c has data with line breaks.
When the VF renders as PDF , I don’t see the line breaks, it directly appears as a single paragraphs.

I want the text area fields to appear on the VF pdf, as it appears on the record detail page with line breaks.


<apex:page standardController="TargetX_SRMb__Essay__c" showHeader="false" applyHtmlTag="false" applyBodyTag="false" standardStylesheets="false" renderAs="PDF">
    <head>
        <style type="text/css">
            @page {
                margin-top: 100px;
                margin-bottom: 100px;
            }
        </style>
    </head>
    <body>
        <div>
            <h2>Essay</h2>
            <table width="100%" cellpadding="5px" cellspacing="5px">
                <tbody>
                    <apex:repeat value="{!$ObjectType.TargetX_SRMb__Essay__c.FieldSets.Essay_Cover_Sheet}" var="field">
                        <tr>
                            <td><b>{!field.label}</b></td>
                        </tr>
                        <tr>
                            <td>{!TargetX_SRMb__Essay__c[field.fieldPath]}</td>
                        </tr>
                    </apex:repeat>
                </tbody>
            </table>
        </div>
    </body>
</apex:page>



 
Iterating over a Map and generating a SOQL query.

    private class WrapperMergeFieldsPreviewCampaign{
        string objectRelationShipName;
        string objectRelationshipType;
        string fieldName;
        string fieldValue;
    }

    Map<String, MergeFieldsPreviewCampaign> mergeFieldDetailsMap =  new Map<String, MergeFieldsPreviewCampaign>();
    MergeFieldsPreviewCampaign mfp = new MergeFieldsPreviewCampaign();


    mergeFieldDetailsMap.put('Account.Id',mfp.objectRelationShipName = 'Account');
    mergeFieldDetailsMap.put('Account.Id',mfp.objectRelationshipType = 'Parent');
    mergeFieldDetailsMap.put('Account.Id',mfp.fieldName = 'Id');
    mergeFieldDetailsMap.put('Account.Id',mfp.fieldValue = null);

    mergeFieldDetailsMap.put('Account.Name',mfp.objectRelationShipName = 'Account');
    mergeFieldDetailsMap.put('Account.Name',mfp.objectRelationshipType = 'Parent');
    mergeFieldDetailsMap.put('Account.Name',mfp.fieldName = 'Name');
    mergeFieldDetailsMap.put('Account.Name',mfp.fieldValue = null);

    mergeFieldDetailsMap.put('Contact.Id',mfp.objectRelationShipName = 'ReportsTo');
    mergeFieldDetailsMap.put('Contact.Id',mfp.objectRelationshipType = 'Parent');
    mergeFieldDetailsMap.put('Contact.Id',mfp.fieldName = 'Id');
    mergeFieldDetailsMap.put('Contact.Id',mfp.fieldValue = null);

    mergeFieldDetailsMap.put('Contact.LastName',mfp.objectRelationShipName = 'ReportsTo');
    mergeFieldDetailsMap.put('Contact.LastName',mfp.objectRelationshipType = 'Parent');
    mergeFieldDetailsMap.put('Contact.LastName',mfp.fieldName = 'Id');
    mergeFieldDetailsMap.put('Contact.LastName',mfp.fieldValue = null);

    mergeFieldDetailsMap.put('Contact_Child__c.Id',mfp.objectRelationShipName = 'ReportsTo');
    mergeFieldDetailsMap.put('Contact_Child__c.Id',mfp.objectRelationshipType = 'Child');
    mergeFieldDetailsMap.put('Contact_Child__c.Id',mfp.fieldName = 'Id');
    mergeFieldDetailsMap.put('Contact_Child__c.Id',mfp.fieldValue = null);

    mergeFieldDetailsMap.put('Contact_Child__c.Name',mfp.objectRelationShipName = 'Contact_Child__c');
    mergeFieldDetailsMap.put('Contact_Child__c.Name',mfp.objectRelationshipType = 'Child');
    mergeFieldDetailsMap.put('Contact_Child__c.Name',mfp.fieldName = 'Name');
    mergeFieldDetailsMap.put('Contact_Child__c.Name',mfp.fieldValue = null);

    OUTPUT OF SYSTEM.DEBUG(mergeFieldDetailsMap);

    Account.Id=MergeFieldsPreviewCampaign:[fieldName=Id, fieldValue=null, objectRelationShipName=Account, objectRelationshipType=Parent]
    Account.Name=MergeFieldsPreviewCampaign:[fieldName=Name, fieldValue=null, objectRelationShipName=Account, objectRelationshipType=Parent]
    Contact.Id=MergeFieldsPreviewCampaign:[fieldName=Id, fieldValue=null, objectRelationShipName=ReportsTo, objectRelationshipType=Parent]
    Contact.LastName=MergeFieldsPreviewCampaign:[fieldName=LastName, fieldValue=null, objectRelationShipName=ReportsTo, objectRelationshipType=Parent]
    Contact_Child__c.Id=MergeFieldsPreviewCampaign:[fieldName=Id, fieldValue=null, objectRelationShipName=Contact_Child__c, objectRelationshipType=Child]
    Contact_Child__c.Name=MergeFieldsPreviewCampaign:[fieldName=Name, fieldValue=null, objectRelationShipName=Contact_Child__c, objectRelationshipType=Child]

    There is a wrapper where I have four string fields and a Map<String, MergeFieldsPreviewCampaign> where I have allocated values for Key and Value in the above code.

    I would like to run this map (mergeFieldDetailsMap) through a loop and generate a query like below. For Contact and Parent of Contact (something like Account) , we could generate a single query and store it in a String something like below.
  • Select Id,Name,Account.Name,AccountId from Contact   
  • Select Id,Name from Contact_Child__c
    Please help.
 
I have a code where there is a map containing and its fields.
I want to extract all the fields from those 2 objects (Contact and Application__c) and store them in a list. I have just declared a Map and added values to it. 
How do I extract all the fields of those two fields and store them in a List. Please help


Map<String,List<String>> objectMap = new Map<String,List<String>>();
List<String> newList = new List<String>{'Contact.Name','Contact.Id'};
List<String> newList1 = new List<String>{'Application__c.Name','Application__c.Id'};

objectMap.put('Contact',newList);
objectMap.put('Application__c',newList1);
 
I have a string variable of an SOQL query where I have a relationship query name but the output returns only the relationship Id. Below is the query and the output in detail.

String s = 'select XYZ__r.Name from contact where Id = \'0031D00000KkQLKQA3\'';
system.debug(Database.query(s));

Output : (Contact:{XYZ__c=a0w1D000000RezuQAC, Id=0031D00000KkQLKQA3})

How do I get the XYZ__r.Name in the output. 
I want to share my Scratch Org to another User in a different location and different IP (in the US with different IP address).
I can generate a username and password and share them but it would ask for a verification code when he tries to login. I don't want that (verification code part) to happen.

So is there is a way (or some steps which could be followed) where I can generate a link and send it to him on which he could just click and open my scratch org.

 
I have a workflow triggering an email alert. Since past two months till last week everything was working fine. But today, (Monday) when I came to office and checked the triggered emails I found , all the email contained empty content. Subject is fine but the Body is empty. 
I checked the time of the emails to see from when this issue is happening. I found that from Saturday evening IST, this issue had started happening. On saturday, there was no change that happened from my end. Infact nobody worked on saturday from my team. 

I also checked the email template content and it looks perfectly ok.
Can you someone help. Has something happnened on Saturday that lead to this problem?
I get the below error while loading a VF page. VF page’s extension is ‘ApplicationReaderController’ which contains a remote action named ‘getMergedPdfUrlWithCookie’.

{"statusCode":400,"type":"exception","ref":false,"action":"Unknown","method":"Unknown","message":"Method 'getMergedPdfUrlWithCookie' not found on controller TargetX_Reader.ApplicationReaderController. Check spelling, method exists, and/or method is RemoteAction annotated.","where":"","data":"","vfTx":true,"vfDbg":true,"tid":6,"result":null,"status":false}

Initially when I loaded the page, I didn’t get this error but when I set the ‘Require HttpOnly attribute’ to true, I got the error. Now I set the Require HttpOnly attribute value to false and then load the page again and I get the error. I refresh the page number of times, I still get that error. I also tried switching that setting (Require HttpOnly attribute) back and forth and I constantly get that error.

Can someone help me with the reason and the solution please.


 
If a class extends to another class, should we separate test class for both or one test class is good enough to cover both the classes?

e.g.
public class ApplicationFormParseJSON extends ApplicationForm
{
// operation happens
}
Another Class :
public virtual class ApplicationForm
{
// operation happens
}

Do I need to write separate Test for the virtual class ApplicationForm ? or ApplicationFormParseJSONTest will be good enough?
There is a Salesforce bug resolved recently (a couple of days ago) The Bug is https://success.salesforce.com/issues_view?id=a1p3A000001FSmyQAG
In this page (https://success.salesforce.com/issues_view?id=a1p3A000001FSmyQAG) saying that the Bug is fixed, I see that it is mentioned that it is fixed on a lot of nodes (domains) like AP, CS, NA and UM.
I have a scratch org with a random domain name namely ‘https://customer-java-5244-dev-ed.cs65.my.salesforce.com/home/home.jsp’.

Will this Bug be resolved in my scratch org as well?
Iterating over a Map and generating a SOQL query.

    private class WrapperMergeFieldsPreviewCampaign{
        string objectRelationShipName;
        string objectRelationshipType;
        string fieldName;
        string fieldValue;
    }

    Map<String, MergeFieldsPreviewCampaign> mergeFieldDetailsMap =  new Map<String, MergeFieldsPreviewCampaign>();
    MergeFieldsPreviewCampaign mfp = new MergeFieldsPreviewCampaign();


    mergeFieldDetailsMap.put('Account.Id',mfp.objectRelationShipName = 'Account');
    mergeFieldDetailsMap.put('Account.Id',mfp.objectRelationshipType = 'Parent');
    mergeFieldDetailsMap.put('Account.Id',mfp.fieldName = 'Id');
    mergeFieldDetailsMap.put('Account.Id',mfp.fieldValue = null);

    mergeFieldDetailsMap.put('Account.Name',mfp.objectRelationShipName = 'Account');
    mergeFieldDetailsMap.put('Account.Name',mfp.objectRelationshipType = 'Parent');
    mergeFieldDetailsMap.put('Account.Name',mfp.fieldName = 'Name');
    mergeFieldDetailsMap.put('Account.Name',mfp.fieldValue = null);

    mergeFieldDetailsMap.put('Contact.Id',mfp.objectRelationShipName = 'ReportsTo');
    mergeFieldDetailsMap.put('Contact.Id',mfp.objectRelationshipType = 'Parent');
    mergeFieldDetailsMap.put('Contact.Id',mfp.fieldName = 'Id');
    mergeFieldDetailsMap.put('Contact.Id',mfp.fieldValue = null);

    mergeFieldDetailsMap.put('Contact.LastName',mfp.objectRelationShipName = 'ReportsTo');
    mergeFieldDetailsMap.put('Contact.LastName',mfp.objectRelationshipType = 'Parent');
    mergeFieldDetailsMap.put('Contact.LastName',mfp.fieldName = 'Id');
    mergeFieldDetailsMap.put('Contact.LastName',mfp.fieldValue = null);

    mergeFieldDetailsMap.put('Contact_Child__c.Id',mfp.objectRelationShipName = 'ReportsTo');
    mergeFieldDetailsMap.put('Contact_Child__c.Id',mfp.objectRelationshipType = 'Child');
    mergeFieldDetailsMap.put('Contact_Child__c.Id',mfp.fieldName = 'Id');
    mergeFieldDetailsMap.put('Contact_Child__c.Id',mfp.fieldValue = null);

    mergeFieldDetailsMap.put('Contact_Child__c.Name',mfp.objectRelationShipName = 'Contact_Child__c');
    mergeFieldDetailsMap.put('Contact_Child__c.Name',mfp.objectRelationshipType = 'Child');
    mergeFieldDetailsMap.put('Contact_Child__c.Name',mfp.fieldName = 'Name');
    mergeFieldDetailsMap.put('Contact_Child__c.Name',mfp.fieldValue = null);

    OUTPUT OF SYSTEM.DEBUG(mergeFieldDetailsMap);

    Account.Id=MergeFieldsPreviewCampaign:[fieldName=Id, fieldValue=null, objectRelationShipName=Account, objectRelationshipType=Parent]
    Account.Name=MergeFieldsPreviewCampaign:[fieldName=Name, fieldValue=null, objectRelationShipName=Account, objectRelationshipType=Parent]
    Contact.Id=MergeFieldsPreviewCampaign:[fieldName=Id, fieldValue=null, objectRelationShipName=ReportsTo, objectRelationshipType=Parent]
    Contact.LastName=MergeFieldsPreviewCampaign:[fieldName=LastName, fieldValue=null, objectRelationShipName=ReportsTo, objectRelationshipType=Parent]
    Contact_Child__c.Id=MergeFieldsPreviewCampaign:[fieldName=Id, fieldValue=null, objectRelationShipName=Contact_Child__c, objectRelationshipType=Child]
    Contact_Child__c.Name=MergeFieldsPreviewCampaign:[fieldName=Name, fieldValue=null, objectRelationShipName=Contact_Child__c, objectRelationshipType=Child]

    There is a wrapper where I have four string fields and a Map<String, MergeFieldsPreviewCampaign> where I have allocated values for Key and Value in the above code.

    I would like to run this map (mergeFieldDetailsMap) through a loop and generate a query like below. For Contact and Parent of Contact (something like Account) , we could generate a single query and store it in a String something like below.
  • Select Id,Name,Account.Name,AccountId from Contact   
  • Select Id,Name from Contact_Child__c
    Please help.
 
I have method , method1() with a try catch block. I also have 2 more methods, method2() and method3() which does some operation and throws an exception.
I want to catch that exception and perform my operation based on the exception message. Below is the code.
I’m getting error here. Please help.

public void static method1(){

try{

Calls method

}catch(Exception ex){

    if (ex == ‘Configuration JSON value limit exceeded’){
        //DO AN OPERATION AND THROW A CUSTOM EXCEPTION
    }
    else if(‘RuleAction HTMLContent limit exceeded’){
        //DO A DIFFERENT OPERATION AND THROW A CUSTOM EXCEPTION
    }

}

}


public void static method2(){

If (//CONDITION SATISFIES){
Calls method3();
}
Else{
throw new StringException('Configuration JSON value limit exceeded');
}
}

public void static method3(){

If (//CONDITION SATISFIES){
Perform an operation
}
else
{
throw new StringException('RuleAction HTMLContent limit exceeded');
}
}
I believe that the Storage limits for Developer Sandbox is 10 MB

Data Storage  :  10MB
File Storage    :  10MB

Can we increase this limit  (by paying or by any other means)  beacuse we are not able to test as 10MB seems a very limited memory provided.

Please help
I have an callout made, where I get this error

System.callout exception :“Exceeded max size limit of 3000000 with request size 3006464

The size of an httprequest is exceeding 3MB.

The record for which I'm invoking the webservice has attachments also being sent in the http request and those attachments are causing the raise in the memory more than 3 MB as a result of whcih I'm getting the error :System.callout exception :“Exceeded max size limit of 3000000 with request size 3006464

So is there a way to zip the attachments in the Webservice code and make the callout i.e. when the webservice is invoked , the attachment should get zipped (size should reduce) and pass to the other environment.

Please help

I have a record whose id (let's say "https://cs5.salesforce.com/006O0000003Jd6R" ) needs to be extracted and stored in a field of the same record everytime a new record is created and the same should happen if an old record is edited and saved.

How do I go about doing that.

Pls help.

 

How do i populate the field value on the vf page using the id of the field (probably from the page's source code)?

 Kindly help.

I have a field which I need to edit only when i click on Edit button of the record.

In case of inline editing , I want it to be read only (I should have that read only lock symbol at the end of the field)

Is it possible in salesforce?

I have an inline vf page on a standard detail page with a button beside a field.

During inline edit, if i enter some detail to the standard detail page field and click on the inline vf button before saving, it should throw up an alert saying "Please save the record".

How do I achieve this ? pls help

Opportunity has a child object named products.
A trigger(first trigger) is written on Product where, when the Product is edited and updated, it updates the opportunity record too.
I have another trigger (second trigger) on opportunity which calls a particular method of a particular class.
Now because of the first trigger, Opportunity undergoes updation everytime a product record is edited as a result of which my second trigger calls the method.
I want my second trigger to call themethod of the class only when i edit the opportunity but not when the (child record) product is edited.
Now how do i give the condition inside the second trigger.

I have a vf page which is displayin in mozilla differently and in google chrome differently
what should be the reason?

I need it to look same in all browsers

 

below is my code

 

 

 

<apex:page sidebar="false" standardcontroller="Business_Unit__c" extensions="shelfnodiplay1" action="{!testit1}">
<apex:form >


<apex:outputPanel id="panel">



<html lang="en">
<head>
<meta charset="utf-8" />

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function() {
$( "#tabs" ).tabs();
});
</script>
</head>
<body>

<div id="tabs" style="background-color:#196C96;" >
<ul>
<li><a href="#tabs-1" style="background-color:#B7E2F0;"><b>SHELF INFO</b></a></li>
<li><a href="#tabs-2" style="background-color:#B7E2F0;"><b>SHELF RESERVATION INFO</b></a></li>

</ul>
<div id="tabs-1" style="background-color:#B7E2F0;">
<body style="background-color:#196C96;"/>
<div align="center" width="550px">
<b>
<apex:outputText value="{!message}" rendered="{!flag}"/>
</b>

</div>

<br/><br/><br/>
<apex:outputText escape="false" value="{!firsttab}"></apex:outputText>

</div>
<div id="tabs-2" style="background-color:#B7E2F0;">
<body style="background-color:#196C96;"/>
<apex:outputText escape="false" value="{!secondtab}"></apex:outputText>
</div>

</div>



</body>
</html>


</apex:outputPanel>
</apex:form>
</apex:page>

 

 

Pls help. its very urgent

i have a vf page inside which I have created a button (using commandbutton).
my requirement is whenever i click on this button inside this vf,
i need a pop up window (a new window) to open, inside which i want the details
from the controller returns to be present under two different tabs and the tabs
should be custom tabs created by code

 

Urgent requirement. Pls help.

I have a vf page named 'TYRINPOUP' which has the below statement which onlick opens another vf named 'twovalues'.

 

<apex:commandButton value="Search" onclick="window.open('/apex/twovalues','','width=800,height=500');" action="{!testing}" rerender="panel"/>

 

i need to pass the id of the current vf (TYRINPOUP) to the other vf 'twovalues'

Pls help

System.CalloutException: Web service callout failed: Failed to deserialize value '8/24/2011', due to:Unable to parse date

 

Pls help. Its very urgent