• Mack Dsoza
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 74
    Questions
  • 78
    Replies

Please explain me that whenever I write Bean class to initialize values of field so at that time what happens...

Suppose I created one custom object & have written get & set property for that object in Bean class i.e. separately apex class named ObjectBean.

Now the confusion is that, Whether this get & set property takes values directly from Page or it takes values from controller.

& what happens in set & get property, as generally says, set sets the value & get returns value.

But as i know that set execute first & then get return that value but entire problem is from where Bean accept these values ?

 

can bean set their value from Database ?

If YES then please tell me how it do ?

 

Please reply me soon for this...

Bcoz my confusion creates many different views....

 

 

 

If I am not getting any key as well as values from Map then please tell me that what are the things that needs to be checked.

Here is my map code,

Map<Id,asset__c> & here I am not getting any key value so what I have to do for it..

 

Regards...

14:48:14.241 (241756000)|SYSTEM_METHOD_EXIT|[466]|Decimal.doubleValue()

14:48:14.241 (241551000)|METHOD_ENTRY|[460]|01pN00000004EQf|GoalMappingBean.populateGoalAseetMapping(Object, String, String, String, Double, Double, Integer, Integer, String, String, Double, Double, Double)
14:48:14.241 (241695000)|SYSTEM_METHOD_ENTRY|[466]|Decimal.doubleValue()
14:48:14.241 (241733000)|EXCEPTION_THROWN|[466]|System.NullPointerException: Attempt to de-reference a null object 

System.NullPointerException: Attempt to de-reference a null object

I am getting above error while executing the below query on system log...

 

GoalAssetAssociation__c a = new GoalAssetAssociation__c();

a.Goal__c = 'a0HN0000000lMhDMAU';

a.GoalYearValue__c=2015.0;

update a; OR upsert a;

 

GoalYearValue__c if a field of type number with numeric value of 16 & decimal value is of 2.

 

Please tell me how can i store value in it...Since I am getting above error....


In Debug log, I see most of the time....

System.Debug(ANY)

 

Please tell me that what is exactly means by ANY here...

Double growthRate  = LifeInsuranceInterest__c.getInstance(description).Rate__c;

 

I am getting an error here, plz tell me what this error means...

 

ErrorError: Compile Error: Not of type Custom Settings at line 545 column 29

goalProfileList = new Goal_Profile__c[endYear - startYear];

 

Here Goal_Profile__c is my custom object but here what is happening...

Can we pass the paramenter in Goal_Profile__c custom object....

<apex:commandLink value="{!STList.RecordType}" action="{!showPopUp}" reRender="PopupPanel">                                  <apex:param name="RtId" value="{!STList.RecordTypeIdStr}" assignTo="{!AssetBeanObj.selRecordTypeId}" />                             <apex:param name="RtName" value="{!STList.RecordType}" assignTo="{!AssetBeanObj.selRecordTypeName}" />                      </apex:commandLink>

 

<apex:actionFunction name="showPopUpfun" action="{!showPopUp}"/> 

 

Here in code both the tags are written as <apex:commandLink> & <apex:actionFunction> so plz tell me that what it will do ?

& What happend when I write both the tags at the same time that means here is any concept of javascript or any other concept that needs to written.

tell me actual purpose of actionFunction & when should I use this tag ?

        List<AggregateResult> aggQueryResult = [
                                                    SELECT Sum(Death_Benefit_Rs__c)deathBenefitSum,
                                                           Sum(Sum_Assured_Rs__c)sumAssured,recordType.Name RTName,
                                                            Entity__r.Name Entity
                                                    FROM
                                                            Insurance__c
                                                    WHERE                                                           
                                                            Flag__c=:'Data Entry'       
                                                    GROUP by
                                                            recordType.Name, Entity__r.Name
                                                ];        
  

Please explain me what it means, bcoz i am quite confuse that i have never putted my condition like this =: 'value'

tell me wht it this ?

System.DmlException: Upsert failed. First exception on row 1; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Quantity]: [Quantity] 
Class.InvestmentAssetServices.save: line 98, column 9 Class.InvestmentAssetController.save: line 113, column 13 External entry point

 

Please tell me how to avoid this error,

Since I have 3 command link, On click of each command link different-2 layout opens but on Click of MF & FI command Link Quanitiy is required field but on click of Stock, it is not required but when i put required for those two(MF, Fi) so while inserting again it shows me that required for Stocks too..

 

Please tell me that what to do for this problem...

Suppose I have two custom objects named AMC_Name__c & Fund__c.

In AMC_Name__c object has 1 custom field as,
1) AMC_Field__c Text(200)

In Fund__c object has 3 custom field as,
1) AMCName__c [Lookup(AMC_Name__c)]
2) AMC_Name__c Text(200)
3) Scheme_Name__c Text(200)

Now I putted some values in AMC_Field__c then by using select list i displays all these values as select option.
Now I want that whenever I select any AMC_Field__c field value then I need its appropriate list of values should appear in another select list field which are stored in Scheme_Name__c of Fund__c object.

Like : Reliance is a AMC_Field__c value then Realiance has many scheme_name__c values like Reliance Life insurance, Realiance Mediculam,....etc above 1000 values of Reliance.

So How I will put the data in Scheme_Name__c in Fund__c so that it will not throw any exception/error of this...Bcoz it is not matching ID...

Error is : System.DmlException: Upsert failed. First exception on row 0 with id a0QN00000000HuCMAU; first error: FIELD_INTEGRITY_EXCEPTION, Fund: id value of incorrect type: a06N00000009bJ2IAI: [Fund__c]
Class.InvestmentAssetServices.save: line 98, column 9 Class.InvestmentAssetController.save: line 113, column 13 External entry point


Please tell me how to insert values for this & please specify the query so that it will be easy for me to track the concept...
For more details requirements then plz let me know....so i can give...



15:36:38.101 (101020000)|METHOD_EXIT|[58]|01pN00000004DV0|InvestmentAssetServices.getSchemeNameList(String)
15:36:38.101 (101133000)|METHOD_ENTRY|[61]|01pN00000004DUv|InvestmentAssetBean.addInvestmentInstanceInList(SOBJECT:Investment_Asset__c, LIST<System.SelectOption>, LIST<System.SelectOption>)
15:36:38.101 (101238000)|METHOD_ENTRY|[61]|01pN00000004DV0|InvestmentAssetServices.getSchemeNameList(String)
15:36:38.101 (101431000)|SOQL_EXECUTE_BEGIN|[40]|Aggregations:0|select Id,Scheme_Name__c from Fund__c WHERE AMCName__c = :amcName
15:36:38.103 (103308000)|SOQL_EXECUTE_END|[40]|Rows:7
15:36:38.103 (103403000)|SYSTEM_METHOD_ENTRY|[42]|LIST.add(ANY)
15:36:38.103 (103437000)|SYSTEM_METHOD_EXIT|[42]|LIST.add(ANY)
15:36:38.103 (103497000)|SYSTEM_METHOD_ENTRY|[44]|LIST.add(ANY)
15:36:38.103 (103607000)|SYSTEM_METHOD_EXIT|[44]|LIST.add(ANY)
15:36:38.103 (103654000)|SYSTEM_METHOD_ENTRY|[44]|LIST.add(ANY)
15:36:38.103 (103699000)|SYSTEM_METHOD_EXIT|[44]|LIST.add(ANY)
15:36:38.103 (103742000)|SYSTEM_METHOD_ENTRY|[44]|LIST.add(ANY)
15:36:38.103 (103786000)|EXCEPTION_THROWN|[44]|System.NullPointerException: Argument 2 cannot be null
15:36:38.103 (103887000)|SYSTEM_METHOD_EXIT|[44]|LIST.add(ANY)
15:36:38.103 (103943000)|METHOD_EXIT|[61]|01pN00000004DV0|InvestmentAssetServices.getSchemeNameList(String)
15:36:38.103 (103979000)|METHOD_EXIT|[61]|01pN00000004DUv|InvestmentAssetBean.addInvestmentInstanceInList(SOBJECT:Investment_Asset__c, LIST<System.SelectOption>, LIST<System.SelectOption>)
15:36:38.104 (104033000)|METHOD_EXIT|[88]|01pN00000004DV0|InvestmentAssetServices.getInvestmentList(InvestmentAssetBean, String, String)
15:36:38.104 (104080000)|CODE_UNIT_FINISHED|InvestmentAssetController invoke(showPopUp)
15:36:39.065 (218488000)|CUMULATIVE_LIMIT_USAGE
15:36:39.065|LIMIT_USAGE_FOR_NS|(default)|



System.NullPointerException: Argument 2 cannot be null 
Class.InvestmentAssetServices.getSchemeNameList: line 45, column 53 Class.InvestmentAssetServices.getInvestmentList: line 62, column 68 Class.InvestmentAssetController.showPopUp: line 88, column 13 External entry point

 

I have command link which have two parameter & whenever i click on that then i gets this fillowing error...

Please tell me about error...

SELECT asset__r.entity__r.name  FROM  GoalAssetAssociation__c

 

This query returns asset__c as each record value...

Plz explain me entire query...

What it means,

asset__r

entity__r

 

why it returns me api name of asset__c...

How will i get the value by this query.

10:40:46.956 (956916000)|SOQL_EXECUTE_BEGIN|[807]|Aggregations:0|
SELECT name,Goal_Profile_Type__c,Debt_Allocation__c,Account__c,                                     Equity_Allocation__c,Gold_allocation__c,Return_expected__c
FROM
    Goal_Profile__c
WHERE
    account__c=:EntityId
                                             
10:40:46.960 (960252000)|SOQL_EXECUTE_END|[807]|Rows:0

 

Please explain me red marked statement...wht it means ?

How to make *.csv file to input data into salesforce custom object ?
Please send me one example of *.csv file so that it will be easy to understand bcoz I have doubt whether it takes first row as field api name or label name or any other name ?
Regards...

I am little bit confuse that what is governer limit in picklist field ?

As i know it that it takes 1000 entries in one picklist but confused in case like if i have created two picklist & both are dependent on each other. If I puts 100 entries in picklist1 but have more than 1000 entries in picklist2 but it will select only less that 1000 after selecting picklist1...

 

So please tell that will it violate the governer limit...

 

System.DmlException: Upsert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Fund: id value of incorrect type: a06N00000009bFoIAI: [Fund__c] 
Class.InvestmentAssetServices.save: line 101, column 9 Class.InvestmentAssetController.save: line 113, column 13 External entry point

Can anyone give code to accept two parameter value from VFPage & put that value as parameter in javascript function & then send that value in URL..

 

like.....call onchange attribute in VFPage with function as onchange="send(val1,val2)"

& send this values to url by javascript...

 

Regards...

<apex:selectList value="{!investmentWrapper.selectedAMCName}" multiselect="false" size="1" onchange="schemeJS(this.value,'{!investmentWrapper.index}');" styleClass="requiredField" style="width:100%">

 

Please tell me that onchange attribute is calling to javascript file or it just goes to controller...

 

As i hope that it is calling javascript file but still in confuse so please clerify it...



If I am not getting any key as well as values from Map then please tell me that what are the things that needs to be checked.

Here is my map code,

Map<Id,asset__c> & here I am not getting any key value so what I have to do for it..

 

Regards...

14:48:14.241 (241756000)|SYSTEM_METHOD_EXIT|[466]|Decimal.doubleValue()

14:48:14.241 (241551000)|METHOD_ENTRY|[460]|01pN00000004EQf|GoalMappingBean.populateGoalAseetMapping(Object, String, String, String, Double, Double, Integer, Integer, String, String, Double, Double, Double)
14:48:14.241 (241695000)|SYSTEM_METHOD_ENTRY|[466]|Decimal.doubleValue()
14:48:14.241 (241733000)|EXCEPTION_THROWN|[466]|System.NullPointerException: Attempt to de-reference a null object 

System.NullPointerException: Attempt to de-reference a null object

I am getting above error while executing the below query on system log...

 

GoalAssetAssociation__c a = new GoalAssetAssociation__c();

a.Goal__c = 'a0HN0000000lMhDMAU';

a.GoalYearValue__c=2015.0;

update a; OR upsert a;

 

GoalYearValue__c if a field of type number with numeric value of 16 & decimal value is of 2.

 

Please tell me how can i store value in it...Since I am getting above error....


Double growthRate  = LifeInsuranceInterest__c.getInstance(description).Rate__c;

 

I am getting an error here, plz tell me what this error means...

 

ErrorError: Compile Error: Not of type Custom Settings at line 545 column 29

goalProfileList = new Goal_Profile__c[endYear - startYear];

 

Here Goal_Profile__c is my custom object but here what is happening...

Can we pass the paramenter in Goal_Profile__c custom object....