• Bhola Vishwakarma
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 59
    Questions
  • 31
    Replies

is their any paticular way that i can save the state of an object so that i can use it later

i have created three recordtypes A ,B ,C 

and i have a picklist of 50 elements how do i display a paticular piclist values on my visualforce page according to my recordtypes

 

 

following is the error how to slove it 

 

 

NotifyUtil::java.net.SocketException: Software caused connection abort: recv failed

i have created database Dml class i was working fine but i just edited i gave me the error so that why pasted the previous code but now it gives me error  invalid type database.saveresult
 

i have Health_History_del__c in account (sandbox ) but when i deploy it to production i am able to see the field but through the SOQL query i am not able to fetch the value in force .com ide even that field does not show in my  vf page

 

what is the possible problem in that

 

this is my following code 

trigger BeforeUpdateGoalYears on Goal__c (before update) {
    for(Integer j = 0; trigger.new.size()>j; j++){
        for(Integer i = 0; trigger.old.size()>i; i++){
           if(trigger.old[i].id == trigger.new[j].id){
               if(!(trigger.old[i].Goal_Start_Year__c == trigger.new[j].Goal_Start_Year__c 
               && trigger.old[i].Goal_End_Year__c  == trigger.new[j].Goal_End_Year__c)){
                    trigger.new[j].moderately_aggressive_profile_years__c = null;
                    trigger.new[j].moderately_conservative_profile_years__c  = null;
                    trigger.new[j].aggressive_profile_years__c  = null;
                    trigger.new[j].conservative_profile_years__c  = null;
                    trigger.new[j].moderate_profile_years__c  = null;
               }
           }
       } 
    }
}

 

what will be the reson for that please help

i have a Asset__c(custom object) in that i have Allocated_amount__c as a Roll-Up Summary (SUM GoalAssetAssociation) and 

Allocated_c is the masterdetail relationship(Asset__c)

 

but when i am deploying my custom objects all the fields were deployed but Allocated_amount__c does not apper over their

 

is their any specific reason so hoew to go about  it

when i am deploying i am getting an following error 

 

GoalAssetAssociation__c.Goal__c       Cannot update relationshipOrder

 

GoalAssetAssociation__c.Asset__c Cannot update referenceTo

 

Asset__c.Allocated_Amount__c invalid parameter value

 

here i have a 

custom objects called as Asset__c in which  Allocated_Amount__c Roll-Up Summary (SUM GoalAssetAssociation)

but in GoalAssetAssociation__c i have Asset__c masterdeail-relationship(Asset__c) can u help me out what will be the way to tackel the problem 

 

 

when to use package concept  so that i can move from sandbox to production

i have a custom object called as asset__c in that i have a field called as Allocated_amount__c(Roll-Up Summary (SUM GoalAssetAssociation) in my sandbox

 

but when i am deploying to production it  get deployed but the custom field called as Allocated_amount__c does not apper over there

 

so what will the problem or is their some specific way to deploy

all my apex classes code coverrage is 77% but i am gettting an error called as Invalid type :DatabaseSoql

 

but my databaseSoql covers 68% does this is the reason why i am getting the errror  

how can i come out of the error

 

Class complies with no error and my application runs in sandbox but when i deploy to production the error comes 

error Invalid type: DatabaseSOQL.

 

so what possible solution is for this .......

@isTest

private class GoalControllerTest {

static Account acc;

public static void testData(){
       acc=new Account(LastName='ABC',FirstName='PQR',RecordTypeId='01220000000DnK3AAK');
       upsert acc;
       system.assertNotEquals(null,acc);
       Entity_Global_Assumption__c ega=new Entity_Global_Assumption__c(Account__c=acc.id,Expected_Return_on_Investment__c=30,Income_Growth_Rate__c=3,Inflation_Rate__c=6,Number_Of_Months__c=5);
       upsert ega;
       system.assertNotEquals(null,ega.id);


i am placeing a piece of my code that gives an error

System.nullpointer Exception Attempt to derefrence null object

what could be the possible reason for that 

so where should i check

@isTestprivate class GoalControllerTest {

static GoalController goalTestCon;

static Account acc;

static GoalOutputController goalOutCon;

static GoalComponentController goalCompCon;

static GoalSummaryController goalSummary;

static Goal__c gol;public static void testData(){ 

acc=new Account(LastName='Account',FirstName='New Account',RecordTypeId='012N0000000083AIAQ'); 

upsert acc;   

system.assertNotEquals(null,acc.id);

 

i am getting an error in the following Line (System.Null pointer exception)

what should i do

how can i deactivate my recordtype of custom object so that i can delete it for use

connection = Connector.newConnection(config1);

QueryResult queryResults1 = connection.query("Select Entity__r.Name, Acquisition_Year__c,Expected_Year_of_Sale__c,Description__c,Current_Value__c,Expected_Growth_Rate__c,Entity__c From Asset__c where Entity__c='"+userid+"'");

                    QueryResult queryResults2 = connection.query("Select Name from Account where id='"+userid+"' or parent_entity__c='"+userid+"'"); 

                    int count=queryResults2.getRecords().length;

                    if (queryResults1.getSize() > 0) {
                    for (int i1=0;i1<queryResults1.getRecords().length;i1++) {
                    Asset__c asset = (Asset__c)queryResults1.getRecords()[i1];
                    out.print(asset.getEntity__r().getName());


(asset.getEntity__r().getName())<---but here i dont get the values what is the proper logic to get the values

i have a custom object called Asset__c in that i have a custom field called as Entity__c (lookup Account)
so by using the java code i want to retrive the name of the entity using in my Asset__c 

so what should be the logic to get it

 

connection = Connector.newConnection(config1);

QueryResult queryResults1 = connection.query("Select Entity__r.Name, Acquisition_Year__c,Expected_Year_of_Sale__c,Description__c,Current_Value__c,Expected_Growth_Rate__c,Entity__c From Asset__c where Entity__c='"+userid+"'");

                    QueryResult queryResults2 = connection.query("Select Name from Account where id='"+userid+"' or parent_entity__c='"+userid+"'"); 

                    int count=queryResults2.getRecords().length;

                    if (queryResults1.getSize() > 0) {
                    for (int i1=0;i1<queryResults1.getRecords().length;i1++) {
                    Asset__c asset = (Asset__c)queryResults1.getRecords()[i1];
                    out.print(asset.getEntity__r().getName());


(asset.getEntity__r().getName())<---but here i dont get the values what is the proper logic to get the values

i have a custom object called Asset__c in that i have a custom field called as Entity__c (lookup Account)
so by using the java code i want to retrive the name of the entity using in my Asset__c 

so what should be the logic to get it

 

the error i am getting is

 

Unable to make this formula automatically derived because it is used in the following roll-up summary field(s): Account.Investment Asset Rollup. To continue, remove any references to derived values such as the current date, current user, or user-role

Error: Invalid Data.
Review all error messages below to correct your data.

 

i am haveing an problem in my formula field i am not able to put the advance fromula in my formula field so 

what should i do to  remove this error 

 

following is  my custom objects(Investment_Asset__c) in which i have to give formula to TotalAsset__c

Allocated_Amount__c	               Roll-Up Summary (SUM GoalInvestmentAssetAssociation)
AMC_Name__c	                       Lookup(AMC Name)
Entity__c	                       Master-Detail(Account)
Face_Value__c	                       Number(15, 3)
fixedIncomesValue__c	               Formula (Currency)
Fund__c	                               Lookup(Fund) 
FundValue__c	                       Formula (Currency)
Maturity_Date__c	               Date
Maturity_Value__c	               Number(18, 0)
Monthly_SIP_Amount__c	               Currency(18, 0)
Remove_Checkbox__c	               Checkbox
Scheme_Name__c	                       Text(40)
Scheme_Type__c	                       Picklist
Script_Name__c	                       Text(40)
SIP_Date__c	                       Date
Stock_Value__c	                       Formula (Currency)
Total__c	                       Currency(18, 0)
TotalAsset__c	                       Formula (Currency)
Units__c	                       Number(15, 2)



another custom object which is rollupSummary is GoalInvestmentAssetAssociation__c in this i have
allocated__c	       Percent(16, 2)
Allocation__c	       Number(16, 2)
Goal__c	                Master-Detail(Goal)
GoalYearValue__c	Number(16, 2)
Investment_Asset__c	Master-Detail(Investment Asset)

 your help would do a lot of good for me

how can we use advance formula even if i have the rollup summary field

can i get any help

 

i have a custom object as InvestmentAsset__c in that ,field called as 

Allocated_Amount__c Roll-Up Summary (SUM GoalInvestmentAssetAssociation) 

and also have formula fields called as TotalAsset__c but when I insert advance formula it gives me an error 

 

Error: Invalid Data.
Review all error messages below to correct your data.
Unable to make this formula automatically derived because it is used in the following roll-up summary field(s): Account.Investment Asset Rollup. To continue, remove any references to derived values such as the current date, current user, or user-role.

 

i have Health_History_del__c in account (sandbox ) but when i deploy it to production i am able to see the field but through the SOQL query i am not able to fetch the value in force .com ide even that field does not show in my  vf page

 

what is the possible problem in that

 

this is my following code 

trigger BeforeUpdateGoalYears on Goal__c (before update) {
    for(Integer j = 0; trigger.new.size()>j; j++){
        for(Integer i = 0; trigger.old.size()>i; i++){
           if(trigger.old[i].id == trigger.new[j].id){
               if(!(trigger.old[i].Goal_Start_Year__c == trigger.new[j].Goal_Start_Year__c 
               && trigger.old[i].Goal_End_Year__c  == trigger.new[j].Goal_End_Year__c)){
                    trigger.new[j].moderately_aggressive_profile_years__c = null;
                    trigger.new[j].moderately_conservative_profile_years__c  = null;
                    trigger.new[j].aggressive_profile_years__c  = null;
                    trigger.new[j].conservative_profile_years__c  = null;
                    trigger.new[j].moderate_profile_years__c  = null;
               }
           }
       } 
    }
}

 

what will be the reson for that please help

i have a custom object called as asset__c in that i have a field called as Allocated_amount__c(Roll-Up Summary (SUM GoalAssetAssociation) in my sandbox

 

but when i am deploying to production it  get deployed but the custom field called as Allocated_amount__c does not apper over there

 

so what will the problem or is their some specific way to deploy

how can we use advance formula even if i have the rollup summary field

can i get any help

 

how can i use my recordtype name in my formula field to check the condition 

i am get the following error

 

System.ListException: List index out of bounds: 0

 

 public List<List<DataEntrySummaryBean>> getPresentFutureValueList {
        get {
            Integer listSize = summaryBeanIndexList.get(0).get(0).fieldList.size(), indexStart;
            for(List<DataEntrySummaryBean> summaryBeanList : summaryBeanIndexList) {                
                for(DataEntrySummaryBean summaryBean : summaryBeanList) {
                    indexStart = summaryBean.fieldList.size();
                    if(indexStart < listSize) {                 
                        for(Integer index = indexStart; index < listSize;index+=2) {
                            summaryBean.fieldList.add(0,0);
                           
                        }
                    }
                }   
            }            
            return summaryBeanIndexList;
        }           
    }  

 

 

when ever i want to run or debug  the apex code  in force.com ide get an following window

 

 

with an error 

 

the selection cannot be launched, their is no recant launcher

 

any idea to solve this problem

how can i run  my project on force.com ide any step  please provide it

 

 

 public List<string> getGeneralExpense(){
        List<string> options = new List<string>();
        Schema.DescribeFieldResult field = Schema.sObjectType.expense__c.fields.General_Expenses__c;
        List<Schema.PicklistEntry> picklist = field.getPicklistValues();
        for(Schema.PicklistEntry p : picklist) {
            options.add(p.getLabel());
        }
        return options;
    }

 

 

can u give an explanation about code

 

How to display all sub pickllist value ?

 

I have one field (picklist) as General_Expense__c which has certain list of values like abc, def, ghi etc...

Also have one another field (picklist as well as controlling field is General_Expense__c) which has list of values as a,b,c,d,e,f...

 

Now whenever I select any field from general expense then its appropriate list of fields should appear like this..

 

abc --> Selected    a

                                  b

                                  c

def --> Selected     d

                                  e

                                  f

ghi --> Selected     g

                                  h

                                  i

 

Error 'VisualforceArrayList.name'

 

<apex:page controller="MyController22">

    <apex:pageBlock title="Retrieving Query String Parameters">

        You are viewing the {!account.name} account.

    </apex:pageBlock>

    </apex:page>

Compile Error: Method does not exist or incorrect signature: Allocation_Action__c.getInstance(String) 

 

 

 

 if(goalAssetMappingBeanList.isEmpty()) {
            goalAssetMappingBeanList.add(mappingBean);
        }else {
            if(Allocation_Action__c.getInstance('Action1').Action__c.equalsIgnoreCase(action)){
                goalAssetMappingBeanList.add(0,mappingBean);                
            } else if (Allocation_Action__c.getInstance('Action2').Action__c.equalsIgnoreCase(action)) { 
                goalAssetMappingBeanList.add(0,mappingBean);
            } else if (Allocation_Action__c.getInstance('Action3').Action__c.equalsIgnoreCase(action)) { 
                goalAssetMappingBeanList.add(mappingBean);
            } else {
                goalAssetMappingBeanList.add(mappingBean);
            }
           }

 

how to deploy form sandbox to production please help

is any shortest way to that