• Stanley Ye
  • NEWBIE
  • 20 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies
We have a customized opportunity view page that overrides standard page in our SF. And now we need to add a controlling dependent list to this page:

Controlling field (picklist): Re-sign term
Dependent field (multi-select picklist): Re-sign Notice Period

We also have another text field: Re-sign term (other)

Our logic is if Re-sign term picklist value equals to 'Other', Re-sign term (other) textbox shoud be displayed, otherwise, keep hidden. We are trying to use Jquery to achieve this, but unfortunately, Jquery .change() event seems not working on this case (Re-sign term value changed, jquery is not triggerred). 

However, if we remove the field dependency, it is working fine. 

Any advices?



 
I'm now working on an custom controller and vf pages that will override standard opportunity behaviours. So far is all good and we get expected results in sandbox with different user profiles. However when I wrote the test method for the controller and trying to run it, I got the following error:

Internal Salesforce Error: 694469977-8690 (1545795159) (1545795159) 

After my investigation, this error occurs when inserting an custom object instance in test method, and below is the code block cause the issue:

Scenario__c sc = new Scenario__c(Opportunity__c=opp.Id, Medical_Centre__c=pryAcc.Id, Contracted_Hours_per_Week__c=40,    
                                                    Contracted_Years__c=5, Evening_Hours_per_Week__c=5, Weekend_Hours_per_Week__c=6,                                                                         Working_Weekends_per_Year__c=40, Weeks_Not_Req_to_Work_per_Year__c='4 weeks', 
                                                    Has_VR_Status__c=true, Ack_Leave_Not_Carried_Over__c=true, Ack_Restricted_Internet_Access__c=true,
                                                    Ack_No_Appointment_Basis__c=true, Ack_No_STD_ISD_Mobile_Ph_Access__c=true,
                                                    Ack_Work_Equal_Share_of_Public_Holidays__c=true, Ack_Xmas_New_Year_Special_Roster__c=true,                                                             DWS_Position_Required__c='Yes', Selected_Price__c=true);
  
 insert sc;

(opp.Id & pryAcc.Id are previoused inserted account and opportunity id, which required in scenario calculator)

If I removed this piece of code, the test passed but will pull down the coverage% of the whole test. I have gone through some online comments but no final solution to this issue.

Any advices on that?



Thanks in advance.
Stanley
Hi,

    I'm now building a new opportunity view page to override the standard one, and the inline editing is working - we can edit on the output fields and also a pencil icon show up when mouse hover on the field is editable.

    My question is If anyone knows how to display the lock icon for non-editable fields when mouse hover on ? 


Thanks
I'm using field set to build our new opportunity view page. The field set displayed in VF page properly and inline edit is working as well. However, when I tried to build the form validation before saving the page, I found I couldn't catch the user input value in the controller or in jquery/javascript(the value can be saved properly but no idea how to catch these values before saving the page).

Anyone has an idea?
Currently working on a view page of opportunity (will override the standard one), and fields in this page should be displayed dynamically (show/hide) after rerender the pageblocksections. But the current fields displayed after rerender (hide 'Field C') are as below:

Field A        Field B         ->>>>>>      Field A      Field B          
Field C        Field D                            Field D      Field E
Field E        Field F                            Field F

Our expectation is :

Field A        Field B          ->>>>>>    Field A      Field B
Field C        Field D                           Field E      Field D
Field E        Field F                                            Field F


Tabindex seems only working for inputField or outputLabel, but not for my situation. Anyone has an idea on that ?
Thanks in advance !!
I'm now working on an custom controller and vf pages that will override standard opportunity behaviours. So far is all good and we get expected results in sandbox with different user profiles. However when I wrote the test method for the controller and trying to run it, I got the following error:

Internal Salesforce Error: 694469977-8690 (1545795159) (1545795159) 

After my investigation, this error occurs when inserting an custom object instance in test method, and below is the code block cause the issue:

Scenario__c sc = new Scenario__c(Opportunity__c=opp.Id, Medical_Centre__c=pryAcc.Id, Contracted_Hours_per_Week__c=40,    
                                                    Contracted_Years__c=5, Evening_Hours_per_Week__c=5, Weekend_Hours_per_Week__c=6,                                                                         Working_Weekends_per_Year__c=40, Weeks_Not_Req_to_Work_per_Year__c='4 weeks', 
                                                    Has_VR_Status__c=true, Ack_Leave_Not_Carried_Over__c=true, Ack_Restricted_Internet_Access__c=true,
                                                    Ack_No_Appointment_Basis__c=true, Ack_No_STD_ISD_Mobile_Ph_Access__c=true,
                                                    Ack_Work_Equal_Share_of_Public_Holidays__c=true, Ack_Xmas_New_Year_Special_Roster__c=true,                                                             DWS_Position_Required__c='Yes', Selected_Price__c=true);
  
 insert sc;

(opp.Id & pryAcc.Id are previoused inserted account and opportunity id, which required in scenario calculator)

If I removed this piece of code, the test passed but will pull down the coverage% of the whole test. I have gone through some online comments but no final solution to this issue.

Any advices on that?



Thanks in advance.
Stanley
Hi,

    I'm now building a new opportunity view page to override the standard one, and the inline editing is working - we can edit on the output fields and also a pencil icon show up when mouse hover on the field is editable.

    My question is If anyone knows how to display the lock icon for non-editable fields when mouse hover on ? 


Thanks
I'm using field set to build our new opportunity view page. The field set displayed in VF page properly and inline edit is working as well. However, when I tried to build the form validation before saving the page, I found I couldn't catch the user input value in the controller or in jquery/javascript(the value can be saved properly but no idea how to catch these values before saving the page).

Anyone has an idea?
Currently working on a view page of opportunity (will override the standard one), and fields in this page should be displayed dynamically (show/hide) after rerender the pageblocksections. But the current fields displayed after rerender (hide 'Field C') are as below:

Field A        Field B         ->>>>>>      Field A      Field B          
Field C        Field D                            Field D      Field E
Field E        Field F                            Field F

Our expectation is :

Field A        Field B          ->>>>>>    Field A      Field B
Field C        Field D                           Field E      Field D
Field E        Field F                                            Field F


Tabindex seems only working for inputField or outputLabel, but not for my situation. Anyone has an idea on that ?
Thanks in advance !!