• DevADS
  • NEWBIE
  • 495 Points
  • Member since 2013

  • Chatter
    Feed
  • 16
    Best Answers
  • 0
    Likes Received
  • 5
    Likes Given
  • 1
    Questions
  • 100
    Replies
Hi All,

I have below data in Description Field of incident.

Application: Oracle eBusiness Suite (eBS)
Change Driver: Migration
Change Category: New scripts
Is this Change part of a Project?: Yes
Non-Technical Reason for Change?: Importing Fieldglass invoices programatically
Do we need a WebEx?: No
Why is WebEx NOT Required?: It is a new component. And all the details are discussed with the functional team.
WebEx/Bridge Information: 
Number of Users Affected: Internal – None
Worst Case if not Implemented: Oracle might not able to import fieldglass invoices
End user experience if Change fails: Oracle might not able to import fieldglass invoices
End User Experience during Change: Once change implemented successfully. User might able to import fieldglass invoice

I want to parse it and want to store only bold text(Number of Users Affected)

Any Suggestion would be appriciated
Hi All,
Use single SOQL quert to fetch the list of contacts. use if condition to check if contact is active then set active contact accordingly.Put logic in helper class and call tis class from trigger

trigger countContact on Contact (after insert, after update, after delete, after undelete) 
{
  Set<Id> setAccountIds = new Set<Id>();
 
  //Whenever your working with After Undelete operation you can access data through 
  //Trigger.new or Trigger.newMap but not with Trigger.old or Trigger.oldmap variables
  if(Trigger.isInsert || Trigger.isUndelete || Trigger.isUpdate)
  {
   for(Contact con : Trigger.new)
   {
    setAccountIds.add(con.AccountId);
   }
  }
 
  if(Trigger.isDelete)
  {
   //if you use Trigger.new below in place of Trigger.old you will end up with 
   //System.NullPointerException:Attempt to de-reference a null object
   for(Contact con : Trigger.old) 
   {
    setAccountIds.add(con.AccountId);
   }
  }
 
 List<Account> listAccs = [Select id,name,Total_No_Of_Contacts__c ,(Select id from contacts) from Account where Id in : setAccountIds];
  for(Account acc :listAccs)
  {
   acc.Total_No_Of_Contacts__c = acc.contacts.size();
  }
          List<Account> listAccs1 = [Select id,name,No_of_active_contacts__c ,(select id from contacts where Contact_Roll__c = True) from Account where Id in : setAccountIds];
  for(Account acc1 :listAccs1)
  {
   acc1.No_of_active_contacts__c = acc1.contacts.size();
  }
  update listAccs;
  update listAccs1;
 
}

Kindly Support and Suggest
Thanks
  • March 26, 2019
  • Like
  • 0
There are 2 pricebooks in our org. I have created one List Button using this URL:
/_ui/sales/quote/lineitem/ChooseQuotePricebook/e?id={!Quote.Id}

I am able to change the pricebook If quote didn't contain any lineitems. But when quote already have lineitems then i am getting below error.

Unable to Access Page
The value of a parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information. 


Thanks,
Santosh Reddy
Hi,
Instead of create the custom settings manually from Setup-->Develop --> Custom Settings -->New , anyone know is any  way to create them automatically in Apex class?
thanks in advanced!
 
Hi all,
I had created one Visualforce page and i want to implement that as a pop up on a Detail Page button.

Right now when i click on a button it automatically move to that vf page.

Thanks in Advance
Is it possible to show the try catch error message from trigger to record page. So that proper error message will be visible for user
Hi all,

I would like first to retrieve all possible metadata from a Developer Edition org and then deploy this content to another Developer Edition org. Unfortunately you can not build change sets in a Developer Edition environment, so I am trying to retrieve the metadata with ANT.
 
As there is no possibility for using change sets I have been trying to use the "ant retrieveUnpackaged" after I added the "retrieveUnpackaged" part to the build.xml file according to this link: https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/forcemigrationtool_retrieve_unpackaged.htm
 
When trying to run the command line "ant retrieveUnpackaged" under the correct location, I am getting the error " Should provide a valid retrieve manifest 'unpackaged'." pointing to the line "unpackaged="unpackaged/package.xml"/>". Even when trying many things I could not find out what is wrong or how can I amend this, so the command creates a package.
 
Any help or guidance will be appreciated.
I wrote this code to solve the trialhead but it gives me this error on trialhead 


error:   The page does not include an &lt;apex:image&gt; component

code:
<apex:page showHeader="false">
    <img id="theImage" src="https://developer.salesforce.com/files/salesforce-developer-network-logo.png" />
</apex:page>

trialhead challenge:
Create a Visualforce page without the standard Salesforce header and display an image using the Visualforce image component. 
Challenge Requirements
The page must be named DisplayImage
It must NOT display the standard Salesforce header
It must use a Visualforce apex:image component to display this image - https://developer.salesforce.com/files/salesforce-developer-network-logo.png
 

Hello,

Did anyone else notice that the view state limit in Visualforce pages has been increased from 135 to 170 KB in the new release of Spring 2019

Hello,

I have converted my lead to Oportunity, contact and account.

How are they interlinked, If i need to query each of them from the others, what is the SOQL query, i can use

Thank in advance
Hi,
 
[{"Name": "US-0000314","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000312","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000315","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000318","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000313","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000317","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000320","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000316","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000322","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000319","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000321","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000324","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000328","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000335","Project":"TestPOC","Release":"Feb-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000337","Project":"TestPOC","Release":"Feb-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000329","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000330","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000336","Project":"TestPOC","Release":"Feb-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000332","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000331","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000334","Project":"TestPOC","Release":"Feb-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000333","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000342","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000344","Project":"TestPOC","Release":"Dec-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000345","Project":"TestPOC","Release":"Feb-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"},{"Name": "US-0000343","Project":"TestPOC","Release":"Feb-GGGG","Username":"AAA.g@ccc.com","Useremail":"AAA.g@BBB.com"}]

I want display the above JSON in below table format in Visualforce page. Please help me.

User-added image
Thanks and Regards,
Diwakar G

Hi,

I am having three record type in opportunity like a,b,c.I want to restrict a user e.g Ram Sharma should not create any opportunity with record type b.
Please suggest me how to do that.I cannot change his profile.
Hi all,

I am facing an issue in a before update trigger, I am just trying to add some characters at the end of a String field:

Trigger.new[0].myField__c  =  Trigger.new[0].myField__c  +  ',00' ;

The issue is that when I enter 12 in this field I should get 12,00.
However I get : 12,00,00

So it looks like my string is concatenated twice...could someone help?

Thanks!
  • January 15, 2014
  • Like
  • 0
Hi ,
i have search code below  where i can search a question with its beginning letter or if i give full question but i want to get the question even  if i given any letter  or word in middile of that question. please help me on this .I hope there might be wrong in like condition.Can i please know how can i solve this?

Here is the code for that
Vf page
<apex:page controller="QuesSearchCont" sidebar="false">
<apex:form >
  <apex:pageMessages id="errors" />

  <apex:pageBlock title="Find Me A Question & Answer!" mode="edit">

  <table width="100%" border="0">
  <tr>
    <td width="200" valign="top">

      <apex:pageBlock title="Parameters" mode="edit" id="criteria">

      <script type="text/javascript">
      function doSearch() {
        searchServer(
          document.getElementById("question").value,
          document.getElementById("answer").value);
      }
      </script>

      <apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors">
          <apex:param name="Question__c" value="" />
          <apex:param name="Answer__c" value="" />
       
       
      </apex:actionFunction>

      <table cellpadding="0" cellspacing="0">
      <tr>
        <td style="font-weight:bold;">QUESTION<br/>
        <input type="text" id="question" onkeyup="doSearch();"/>
        </td>
      </tr>
      <tr>
        <td style="font-weight:bold;">ANSWER<br/>
       <input type="text" id="answer" onkeyup="doSearch();"/>
        </td>
      </tr>
            </table>

      </apex:pageBlock>

    </td>
    <td valign="top">

    <apex:pageBlock mode="edit" id="results">

        <apex:pageBlockTable value="{!faq}" var="faqs">

            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Question" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="question" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
              <apex:outputField value="{!faqs.Question__c}"/>
            </apex:column>

            <apex:column >
                <apex:facet name="header">
                    <apex:commandLink value="Answer" action="{!toggleSort}" rerender="results,debug">
                        <apex:param name="sortField" value="answer" assignTo="{!sortField}"/>
                    </apex:commandLink>
                </apex:facet>
               <apex:outputField value="{!faqs.Answer__c}"/>
            </apex:column>
        </apex:pageBlockTable>

    </apex:pageBlock>

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

  <apex:pageBlock title="Debug - SOQL" id="debug">
      <apex:outputText value="{!debugSoql}" />        
  </apex:pageBlock> 

  </apex:pageBlock>

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

Controler:public with sharing class QuesSearchCont {
// the soql without the order and limit
private String soql {get;set;}
  // the collection of contacts to display
  public List<FAQ__c> faq {get;set;}

  // the current sort direction. defaults to asc
  public String sortDir {
    get  { if (sortDir == null) {  sortDir = 'asc'; } return sortDir;  }
    set;
  }

  // the current field to sort by. defaults to last name
  public String sortField {
    get  { if (sortField == null) {sortField = 'Question__c'; } return sortField;  }
    set;
  }

  // format the soql for display on the visualforce page
  public String debugSoql {
    get { return soql + ' order by ' + sortField + ' ' + sortDir + ' limit 20'; }
    set;
  }

  // init the controller and display some sample data when the page loads
  public QuesSearchCont() {
    soql = 'select Question__c, Answer__c from FAQ__c where Question__c!= null';
    runQuery();
  }

  // toggles the sorting of query from asc<-->desc
  public void toggleSort() {
    // simply toggle the direction
    sortDir = sortDir.equals('asc') ? 'desc' : 'asc';
    // run the query again
    runQuery();
  }

  // runs the actual query
  public void runQuery() {

    try {
      faq = Database.query(soql + ' order by ' + sortField + ' ' + sortDir + ' limit 20');
    } catch (Exception e) {
      ApexPages.addMessages(e);
    }

  }

  // runs the search with parameters passed via Javascript
  public PageReference runSearch() {
try{
FAQ__c f=new FAQ__c();
    String question = Apexpages.currentPage().getParameters().get('Question__c');
    String answer = Apexpages.currentPage().getParameters().get('Answer__c');
 

  
    soql = 'select Question__c, Answer__c from FAQ__c where Question__c!= null';
    if (!question.equals(''))
      soql += ' and Question__c LIKE \''+String.escapeSingleQuotes(question)+'%\'';
    if (!answer.equals(''))
      soql += ' and Answer__c LIKE \''+String.escapeSingleQuotes(answer)+'%\'';
   // if (!accountName.equals(''))
     // soql += ' and account.name LIKE \''+String.escapeSingleQuotes(accountName)+'%\'';
  
    // run the query again
    }
     catch(NullPointerException ne){
     ApexPages.addMessages(ne);
    }
    runQuery();

    return null;
    }



}

hi,

can some help me

 List<SObject> ObjectContents;

String query=Select name from contact;

 ObjectContents = database.query(query);

 

if my query returns 2 rows then size of objectcontents wll be how much?

 

Thanks.

  • September 03, 2013
  • Like
  • 0

Hello,

 

I have some doubts around EchoSign App, If anyone has already worked on it or having any experience, Please help me for following scenarios!

 

1) I have a scenario where I want to send the Opportunity data with the Agreement for eSignature. so how can I achieve this?

 

2) When the I will get the Agreement after Signature, I want to extract the Signature of that document & store it on Perticular Detail page like as
in "Authorized By" section of another object.

 

Thanks accolades!

  • September 27, 2013
  • Like
  • 0
Hi All,

I have below data in Description Field of incident.

Application: Oracle eBusiness Suite (eBS)
Change Driver: Migration
Change Category: New scripts
Is this Change part of a Project?: Yes
Non-Technical Reason for Change?: Importing Fieldglass invoices programatically
Do we need a WebEx?: No
Why is WebEx NOT Required?: It is a new component. And all the details are discussed with the functional team.
WebEx/Bridge Information: 
Number of Users Affected: Internal – None
Worst Case if not Implemented: Oracle might not able to import fieldglass invoices
End user experience if Change fails: Oracle might not able to import fieldglass invoices
End User Experience during Change: Once change implemented successfully. User might able to import fieldglass invoice

I want to parse it and want to store only bold text(Number of Users Affected)

Any Suggestion would be appriciated
Hi All,
Use single SOQL quert to fetch the list of contacts. use if condition to check if contact is active then set active contact accordingly.Put logic in helper class and call tis class from trigger

trigger countContact on Contact (after insert, after update, after delete, after undelete) 
{
  Set<Id> setAccountIds = new Set<Id>();
 
  //Whenever your working with After Undelete operation you can access data through 
  //Trigger.new or Trigger.newMap but not with Trigger.old or Trigger.oldmap variables
  if(Trigger.isInsert || Trigger.isUndelete || Trigger.isUpdate)
  {
   for(Contact con : Trigger.new)
   {
    setAccountIds.add(con.AccountId);
   }
  }
 
  if(Trigger.isDelete)
  {
   //if you use Trigger.new below in place of Trigger.old you will end up with 
   //System.NullPointerException:Attempt to de-reference a null object
   for(Contact con : Trigger.old) 
   {
    setAccountIds.add(con.AccountId);
   }
  }
 
 List<Account> listAccs = [Select id,name,Total_No_Of_Contacts__c ,(Select id from contacts) from Account where Id in : setAccountIds];
  for(Account acc :listAccs)
  {
   acc.Total_No_Of_Contacts__c = acc.contacts.size();
  }
          List<Account> listAccs1 = [Select id,name,No_of_active_contacts__c ,(select id from contacts where Contact_Roll__c = True) from Account where Id in : setAccountIds];
  for(Account acc1 :listAccs1)
  {
   acc1.No_of_active_contacts__c = acc1.contacts.size();
  }
  update listAccs;
  update listAccs1;
 
}

Kindly Support and Suggest
Thanks
  • March 26, 2019
  • Like
  • 0
Hi,

I am new to the enviornment.

I am trying to send https get request to a server from LWC but it doesn't work. I have added the remote server domaion to CORS & CSP trusted sites but nothing help.

WIll appericiate nay help here.

Access to XMLHttpRequest at 'http://.......' from origin 'https://ruby-enterprise-9373-dev-ed.lightning.force.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
There are 2 pricebooks in our org. I have created one List Button using this URL:
/_ui/sales/quote/lineitem/ChooseQuotePricebook/e?id={!Quote.Id}

I am able to change the pricebook If quote didn't contain any lineitems. But when quote already have lineitems then i am getting below error.

Unable to Access Page
The value of a parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information. 


Thanks,
Santosh Reddy
          String pvd = apexpages.currentpage().getparameters().get('pv');

         Pl_target_c target =[Select Name from Pl_target_c where Id=:Id.valueOf(pvd) LIMIT 1];
 
  • March 25, 2019
  • Like
  • 0
Hi Team,

How can we do Visualforce page block section hide & enable based on custom object picklist value ?


Thanks,
Lakshminarasimha.

 
Hello 
As I am trying to show records in jquery.
Onloading page it appears,but select some records which should be assoicated with it,then it disappear.

Any help
  • March 20, 2019
  • Like
  • 0
Hi All,
I have VF page in which I have one command button if supose user insert the data suceesfully it should display message "Record is inserted" and if some error occur it should display message "Record is not created".
 
<apex:commandButton action="{!processSelected}" value="Run Template" onComplete="Refresh();"/>

Thanks in advance
Hi,
Instead of create the custom settings manually from Setup-->Develop --> Custom Settings -->New , anyone know is any  way to create them automatically in Apex class?
thanks in advanced!
 
Hi all,
I had created one Visualforce page and i want to implement that as a pop up on a Detail Page button.

Right now when i click on a button it automatically move to that vf page.

Thanks in Advance
Is it possible to show the try catch error message from trigger to record page. So that proper error message will be visible for user

We are looking at the api.status.salesforce.com response from 

curl -X GET "https://api.status.salesforce.com/v1/instances/status/preview?childProducts=false" -H "accept: application/json" 

When you are looking at the response from the API, that status has several possible values. 
{
"key": "NA79",
"location": "NA",
"environment": "production",
"releaseVersion": "Spring '19 Patch 11.5",
"releaseNumber": "218.11.5",
"status": "OK",
"isActive": true,
...
}
 
The possible status values are: 
[
"OK",
"MAJOR_INCIDENT_CORE",
"MINOR_INCIDENT_CORE",
"MAINTENANCE_CORE",
"MAJOR_INCIDENT_NONCORE",
"MINOR_INCIDENT_NONCORE",
"MAINTENANCE_NONCORE"
]

Question: 
What is included in "MAJOR_INCIDENT_CORE"? I assume the big clouds like Sales Cloud, Service Cloud, Community Cloud. Yes? 

What about the other services like Search, Analytics, Live Agent, and CPQ that have their own check-boxes on the status page. 

What is included in "MAJOR_INCIDENT_NONCORE" ?  

We are writing a monitor, and I'd like to know if it needs to pay attention to "MAJOR_INCIDENT_NONCORE" as a serious alert status to notify management and / or users of.  

If a formula field value on a record changes without the record being modified itself (last modification date), will the getUpdated() call of the replication API include this record's ID?

Hello,

Did anyone else notice that the view state limit in Visualforce pages has been increased from 135 to 170 KB in the new release of Spring 2019

Hi folks
All of our non-batch scheduled apex classes (where the limit is supposed to be 100 according to the documentation as we read it) suddenly started erroring out with Spring '15 saying the limit is 5. These are NOT batch jobs.  We have activated FlexQueue anyway. 
It appears others have found this issue. E.g. http://salesforce.stackexchange.com/questions/66607/scheduled-apex-limit-exceeded-spring-15

I tried making a case with SF but could not get past the standard support who pointed me to the batch limit documentation and flex queue. 

We'd be super grateful if anyone could tell us if:
1) SF recognizes this as a bug
2) If anything is being done about it
3) If there are known workarounds.

Thanks
Hi All,

I had scheduled around 22 Jobs till last Friday on on SF Org with different schedules. All these 22 jobs were visible in Scheduled Jobs Tab. Starting from this Monday(16th Feb 2015) I'm getting an Error : System.AsyncException: You have exceeded the maximum number (5) of Apex scheduled jobs when I try to schedule the same number of Jobs.
Its allowing only 5 Jobs to be submitted. 

Org might have been upgraded to Spring 2015 over the weekend. As per the Spring 2015 notes, we can use Apex Flex Queues to shcedule upto 100 Apex Jobs. We tried activating the Apex Flex Queue from Critical Updates section, but still the issue persists.

Need advise on what can be done to get the limit back to 100.
Hi there

This is weird..  Never thought I've encountered that before.  Is it new...?

The following code works, just as you would expect.

<apex:page standardController="account">
    <apex:repeat value="{!account.contacts}" var="CONTACT">
        <apex:outputField value="{!CONTACT.name}" />
    </apex:repeat>
</apex:page>

However, if I change the outputField to this (only hanged the apex:outputField line),

<apex:page standardController="account">
    <apex:repeat value="{!account.contacts}" var="CONTACT">
        <apex:outputField value="{!contact.name}" />
    </apex:repeat>
</apex:page>

I got this error mssage:
Error: Unknown property 'AccountStandardController.contact'

This is really against what I have believed for a long time that VF is case insensitive.

Has anyone else seen this before?

Note:  I originally had var="Contact".  My above code, var="CONTACT", is simply for illustrations.

Thanks
king

As many of you have discovered, our developer community is awesome. The wealth of knowledge here is phenomenal. This is an all volunteer community and people who take the time to help and post answers do so totally on their own initiative. With that said when someone provides the right answer to your question please take the time to mark their answer as the accepted solution. Also give them a kudos if they've really gone the extra mile to help out. Show some love ;)