• DevADS
  • SMARTIE
  • 554 Points
  • Member since 2013

  • Chatter
    Feed
  • 18
    Best Answers
  • 0
    Likes Received
  • 5
    Likes Given
  • 1
    Questions
  • 107
    Replies
SF developers,

I need an advice. I have visual page with inputText 
<apex:page controller="inputIntegerCtrl">
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!saveValue}" reRender="bs"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection columns="1" id="bs">
                <apex:inputText label="value" value="{!intValue}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
public class inputIntegerCtrl {
    public Integer intValue {get;set;}
    public void saveValue() {
    }
}
When I try to delete variable value and press button "Save", value integer variable is becoming "0" instead of "null"
I found a page that describes this problem https://salesforce.stackexchange.com/questions/64339/apex-inputtext-bound-to-integer-takes-0-instead-of-null

I try to create string setter 
public class inputIntegerCtrl {
    public Integer intValue;

    public String getIntValue() {
        return String.valueOf(intValue);
    }

    public void setIntValue(string intValue) {
        if (intValue != null)
            this.intValue = Integer.valueOf(intValue);
    }

    public void saveValue() {
    }
}

But, now, i have error message "
Error: Read only property 'inputIntegerCtrl.intValue'"

Does anyone know how to solve this problem?
Getting heap size error while deserializing json response in apex

(List<ContractServiceResponseWrapper.Item>)System.JSON.deserialize(JSON.serialize(myMaps), List<ContractServiceResponseWrapper.Item>.class)

 
For example i want to count the records in opportunity for the conditions like type='New customer' and StageName='Prospecting' in a single query?
plz reply back with your answers, thanks in Advance
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
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];
 
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