• ludi
  • NEWBIE
  • 0 Points
  • Member since 2012
  • Software Developer
  • Language Service Associates

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
HI All,

I have a custom object. I have a lot of apex code behind but i have come across a issue and i am not sure how to work around it.

Issue: I have custom fields taking in data from the Oppurtunity,account, and contacts object. I do this through Apex code. My issue is I want a value to be set on a field from that objects curretn record, BUT when the status is approved or pending, I want that current value to stay the same even if it changes in the related object. So, I want different versions in my custom objects records... This will show the values when it was approved on past records.

Here is a snippet of a piece of code that will return a incorrect value once this condition doesnt meet.

IF ( acctReq.Status__c!='Approved' && acctReq.Status__c!='Pending' )
        {
            acctReq.CO_ID_Number__c = AR_Account.CO_ID_Number__c;
           acctReq.GPO_ID_Number__c = AR_Account.GPO_Id_Number__c;
            acctReq.Call_Volume__c = AR_Opportunity.Volume_Minutes_per_Month__c;
    
        }
Side note: AR_Account is a object toward the accounts object and acctReq is coming from my custom object.
  • August 11, 2014
  • Like
  • 0

Hi,

New with salesforce code:

I am having issues with getting a custom visual page to auto check a check box. I feel like this is happening because it is a custom page, and something needs to be added into the apex code to force a true value into the checkbox(I am not sure where) to do this. Here is what my apex code for this value looks like for the checkbox on this apex custom visual page:(Any help is much apprecciated thanks!)

        <apex:inputField value="{!Account_Request__c.Test_route__c}" required="false"/>
  • May 31, 2012
  • Like
  • 0
HI All,

I have a custom object. I have a lot of apex code behind but i have come across a issue and i am not sure how to work around it.

Issue: I have custom fields taking in data from the Oppurtunity,account, and contacts object. I do this through Apex code. My issue is I want a value to be set on a field from that objects curretn record, BUT when the status is approved or pending, I want that current value to stay the same even if it changes in the related object. So, I want different versions in my custom objects records... This will show the values when it was approved on past records.

Here is a snippet of a piece of code that will return a incorrect value once this condition doesnt meet.

IF ( acctReq.Status__c!='Approved' && acctReq.Status__c!='Pending' )
        {
            acctReq.CO_ID_Number__c = AR_Account.CO_ID_Number__c;
           acctReq.GPO_ID_Number__c = AR_Account.GPO_Id_Number__c;
            acctReq.Call_Volume__c = AR_Opportunity.Volume_Minutes_per_Month__c;
    
        }
Side note: AR_Account is a object toward the accounts object and acctReq is coming from my custom object.
  • August 11, 2014
  • Like
  • 0

Hi,

New with salesforce code:

I am having issues with getting a custom visual page to auto check a check box. I feel like this is happening because it is a custom page, and something needs to be added into the apex code to force a true value into the checkbox(I am not sure where) to do this. Here is what my apex code for this value looks like for the checkbox on this apex custom visual page:(Any help is much apprecciated thanks!)

        <apex:inputField value="{!Account_Request__c.Test_route__c}" required="false"/>
  • May 31, 2012
  • Like
  • 0