• Jason Reiber [ACS]
  • NEWBIE
  • 105 Points
  • Member since 2015
  • Adaptiv Consulting Services, LLC

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 4
    Likes Given
  • 1
    Questions
  • 36
    Replies
Hi All!  I am following this tutorial and do not understand step 4.  I follow the entire step and do not see a "create apex controller newOpporutunityController" option.

http://developer.force.com/cookbook/recipe/creating-a-wizard-with-visualforce-pages

Please help!
Hello,

I have multiple problems. But before that I want to share the code that I wrote.

Apex Class:
public with sharing class meetingAttendeeExtension {
    public List<MeetingAttendees__c> listMeetingAttendee {get; set;}
    MeetingAttendees__c meetingAttendee = new MeetingAttendees__c();
    public String KARId = apexpages.currentpage().getParameters().get('id');
    ApexPages.StandardController controller;
    public meetingAttendeeExtension(ApexPages.StandardController controller) {
        listMeetingAttendee = new List<MeetingAttendees__c>();
        listMeetingAttendee.add(meetingAttendee );
        controller = this.controller;
    }
    public void addMeetingAttendee(){
        MeetingAttendees__c meetAtt = new MeetingAttendees__c();
        listMeetingAttendee.add(meetAtt);
    }
    public PageReference saveMeetingAttendees() {
        for(Integer i=0; i<listMeetingAttendee.size(); i++)
        {
            insert listMeetingAttendee;
        }
        return new PageReference('/' + Schema.getGlobalDescribe().get('Key_Account_Report__c').getDescribe().getKeyPrefix() + '/o'); // this works but not what I am trying to acheive
        }
    public PageReference cancel(){
        return new PageReference('/' + controller.getId() );// returns null
    }
}

Visualforce Page: 
<apex:pageBlock >
             <apex:pageBlockSection title="Add Meeting Attendees" columns="1">
             <apex:pageBlockTable value="{!listMeetingAttendee}" var="meetAtt" id="customTable">
             <apex:column headerValue="Key Account Report Name">
                 <apex:inputField value="{!meetAtt.Call_Report__c}"/>
             </apex:column>
             <apex:column headerValue="Attendee Type">
                 <apex:inputField value="{!meetAtt.Attendee_Type__c}"/>
             </apex:column>
             <apex:column headerValue="Attendee Name">
                 <apex:inputField value="{!meetAtt.Attendee_Name__c}"/>
             </apex:column>
             </apex:pageBlockTable>
             </apex:pageBlockSection>
             <apex:pageBlockButtons >
                 <apex:commandButton value="Add Account Row" action="{!addMeetingAttendee}" rerender="customTable"/>
                 <apex:commandButton value="Save Meeting Attendees" action="{!saveMeetingAttendees}"/>
                 <apex:commandButton value="Cancel" action="{!cancel}" immediate="true"/>
             </apex:pageBlockButtons>
             
         </apex:pageBlock>
     </apex:form>
</apex:page>

Now there are following questions that I am trying to find but unable to implement.
Meeting_Attendees__c is child to Key_Account_Reports__c(Master Detail Relationship).
1. when I click "Add New Attendees", the name of Parent Key Account report does not poppulate by itself (how to do this)
2. controller.getId() gives me null, i am expecting to get parent ID here, is this right way ?

Solving above will help me acheive following.
1. Auto populate name of parent object so that user need not select it from the huge liste of Key Account Reports
2. create buttons which will navigate user to parent record, detail view page.

I found previous post related  to this https://developer.salesforce.com/forums/#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=906F000000090tcIAA

but this does not help.

Please suggest some way to acheive above.

Regards, 
Nitin V Palmure
Hello,

Being that I needed custom fields added to our notes I created a new custom Note object which works pretty well.  However I need to have notes associated to many other custom objects in the organization.  

Is this something I can achieve using the RecordType mechanism in Salesforce or do I need to create a custom Note object for each custom object that needs to support the notes functionality?

Basically all the fields will be the same for the various note needs, but I need to filter the notes to only show for the given custom object for which the note applies.

Thanks.
I'm wondering if maybe I'm doing something wrong with the IDE.  I executed some anonymous code in the IDE which included insert statements, then later I noticed in the tenant that the data was actually inserted into the DB and left there.  When the same code was executed via the Developer Console, this did not happen.  Is there some setting in the IDE or some extra thing I need to do to avoid this?  Fortunately it hasn't caused any real problems other than a little data clean up and now I can't use the Execute Anonymous feature in the IDE.  Here is the code I was executing :
 
Administration__c admin = new Administration__c();
insert admin;
System.debug('>>>>> admin id = ' + admin.id);
Certification_Type__c certType = new Certification_Type__c(Active__c=true, Administration__c=admin.id);
insert certType;
System.debug('>>>>> cert type id = ' + certType.id);

It was creating both the Certificatin Type and Administration custom object records and not deleting them after the code was finished executing them.  Any thoughts?
I'm wondering if maybe I'm doing something wrong with the IDE.  I executed some anonymous code in the IDE which included insert statements, then later I noticed in the tenant that the data was actually inserted into the DB and left there.  When the same code was executed via the Developer Console, this did not happen.  Is there some setting in the IDE or some extra thing I need to do to avoid this?  Fortunately it hasn't caused any real problems other than a little data clean up and now I can't use the Execute Anonymous feature in the IDE.  Here is the code I was executing :
 
Administration__c admin = new Administration__c();
insert admin;
System.debug('>>>>> admin id = ' + admin.id);
Certification_Type__c certType = new Certification_Type__c(Active__c=true, Administration__c=admin.id);
insert certType;
System.debug('>>>>> cert type id = ' + certType.id);

It was creating both the Certificatin Type and Administration custom object records and not deleting them after the code was finished executing them.  Any thoughts?
Hi Experts,

I want to display one text area field (Notes_c) in exist VF Page.

Below is my code.

VF Code:

<tr>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>
    <td width="10%">&nbsp;</td>   

    <td width="2%" align="right"><b></b></td>
    <td width="10%" align="right"><b>Notes :</b></td>         
    <td width="55px" align="right"><b><apex:outputField value="{!MyNotes.Notes__c}"/></b>&nbsp;&nbsp;</td>
    <td width="50px;"><b>&nbsp;&nbsp; </b></td>
    <td width="50px;"><b>&nbsp;&nbsp; </b></td>
</tr>    

Apex Class:

public string ptcid {get; set;}
public WeeklyTimeCards__c MyNotes{get;set;}   

public ProjectWeekTimeCardNewController(ApexPages.StandardController controller){
ptcid =  ApexPages.currentPage().getParameters().get('ptcid');
MyNotes = [select id, Notes__c FROM WeeklyTimeCards__c WHERE id =: ptcid];   
system.debug('##' + MyNotes );

Is the above code correct?
Why we use debug function in class?

Anyone please sort out this.
Thanks in advance.

Thanks,
Manu
I have this formula where all 3 fields must be true.  However, the last one Source__c should be OR, not AND.  How to change this?

AND (ISPICKVAL ( Type, "Customer" ), ISPICKVAL ( Status__c , "New" ),
ISPICKVAL ( Source__c , "Webinar" ))
Hi,

On the Order object I have a requirement to create custom button to check if the custom field(check box) in object Account object is check or not. Can I do this using Javascript only if yes, can anybody show me? if no  and i need to do a VF and controller on this please let me know

Example of displaying custom field in an order:
alert('{!Order.SAP_Status__c}');

but if i want to display using the standard fields like Accountname, accountNumber, how will get these value.


Thanks,
Smurfet

 
 
I'm new to Eclipse and Force.com (salesforce.com) development.  I'm on a windows 7 64 bit o/s.  I have Eclipse IDE for Java EE developers 4.4.1.  I've successfully installed Force.com IDE 31.0.0.201406301722, as well as jdk 1.7. I get no errors whatsoever on any of the installations.

I've tried a bunch of the suggestions including the ones i've listed below, but still have issues:
  • explicitly list the path of the jdk in the eclipse.ini
  • download various jar files in the eclipse plug-in directory
  • tried installing different versions of jdk separately (1.6, 1.8)
  • uninstalled eclipse and jdk several times
  • installing Force.com from eclipse marketplace
So far, nothing has worked.  A lot of the suggestions solutions are more than 1 year old and use previous version of Eclipse and Force.com.  So i'm reposting with the hope that someone is using similiar version of the o/s, eclipse and Force.com that i am.

Any help would be appreciated.  Thanks.
Hi, I'm putting together a trigger to handle some of my workflow rules (our org is hitting limits) and I keep getting the following error:
"Error:Apex trigger AR_Email_Alerts caused an unexpected exception, contact your administrator: AR_Email_Alerts: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.AR_Email_Alerts: line 62, column 1"
Usually I get this error when I'm trying to set a variable value to a field that is null.  However, in this case the value I'm using is OwnerId and on a record that already exists.  Can anyone help pinpoint what might be the issue?  Thanks!
 
trigger AR_Email_Alerts on Apttus__APTS_Agreement__c (after insert, after update) {

    String[] toRecipients;
    String[] ccRecipients;
    String templateApiName;
    ID targetObjId;
    Id whatId;
    ID orgWideEmailId;
    Boolean saveAsActivity;
    Attachment[] attachList;
    Map<String, Id> typeMap = New Map<String, Id>();
    recordtype rt2;
    Map<string, id> userEmail = new map<string, id>();
 	ID rtID = Schema.SObjectType.Apttus__APTS_Agreement__c.getRecordTypeInfosByName().get('Appropriations Request').getRecordTypeID();
    
    for (Apttus__APTS_Agreement__c agmt :trigger.new){
        if (agmt.recordtypeid == rtID) {
            //Workflow rule for when AR is Activated - updates fields and sends email to AR Preparer and Requestor
            if((agmt.Apttus__Status_Category__c == 'Request' && agmt.Apttus__Workflow_Trigger_Viewed_Final__c == true)
               || (agmt.Apttus_Approval__Approval_Status__c =='Approved' && agmt.AR_Total_Appropriations_Request_Total2__c < 1000) 
               || (agmt.Apttus_Approval__Approval_Status__c =='Approved' && agmt.AR_Capital_Expenditure_Total__c <1000 && agmt.AR_Option_or_New_Lease__c =='Option')){
                   User user1;
                   User user2;
                   user1.id = agmt.Apttus__Requestor__c;
                   user2.id = agmt.AR_Preparer__c;
                   toRecipients.add(user1.email);
                   toRecipients.add(user2.email);
                   templateApiName = 'AR_Activated';
                   targetObjId = user1.id;
                   agmt.Apttus__Activated_Date__c = Date.today();
                   agmt.Apttus__Workflow_Trigger_Viewed_Final__c = false;
                   agmt.Apttus__Status__c = 'Activated';
                   agmt.Apttus__Status_Category__c = 'In Effect';
               }
            //AR Admin Tasks workflow rule - sends email to Owner/AR Admin
            else if(agmt.Apttus__Status__c == 'Approved Request' 
               && agmt.AR_Reference_Number__c == '' 
               && agmt.AR_Total_Appropriations_Request_Total2__c >= 1000 
               && agmt.AR_Option_or_New_Lease__c !='Option'){
                   User user1;
                   user1.id = agmt.Ownerid;
                   toRecipients.add(user1.email);
                   templateApiName = 'AR_Administrator_Admin_Tasks';
                   targetObjId = user1.id;
               }
            //CPMO Admin pause - sends email to Owner/AR Admin to notify the AR Admin to start the CPMO approvals
            else if(agmt.Apttus__Status__c == 'Submitted Request' 
               && agmt.Apttus_Approval__Approval_Status__c =='Not Submitted' 
               && agmt.AR_Total_Appropriations_Request_Total2__c >= 20000){
                   ID oID = agmt.Ownerid;
                   User user1;
                   user1.id = oID;
                   toRecipients.add(user1.email);
                   templateApiName = 'AR_Administrator_CPMO_Admin_Pause';
                   targetObjId = user1.id;
               }
            //Sub-committee Admin pause - sends email to Owner/AR Admin to notify the AR Admin to start the sub-committee approvals
            else if(agmt.Apttus__Status__c == 'Request Approval' 
               && agmt.Apttus_Approval__Approval_Status__c =='Not Submitted' 
               && agmt.AR_Total_Appropriations_Request_Total2__c >= 1000){
                   User user1;
                   user1.id = agmt.Ownerid;
                   toRecipients.add(user1.email);
                   templateApiName = 'AR_Administrator_Subcommittee_Admin_Pause';
                   targetObjId = agmt.Ownerid;
               }
            whatId = '01Io00000009t1OEAQ';
            orgWideEmailId = '0D2o0000000TNsu';
            sendTemplatedEmailClass.sendTemplatedEmail(toRecipients, ccRecipients, templateApiName, targetObjId, whatId, orgWideEmailId);
        }
    }

}

 
I have added 3 products to an opportunity.When I try to edit the product (opportunity product detail), I need to show differnt fields based on the the the products I am editing. Since I can not create record types for opportunity product I want to write a visualforce page.

Can I achive this by creating a custom class and a visualforce page?
 
Hi All!  I am following this tutorial and do not understand step 4.  I follow the entire step and do not see a "create apex controller newOpporutunityController" option.

http://developer.force.com/cookbook/recipe/creating-a-wizard-with-visualforce-pages

Please help!
I'm getting the following error everytime I click the "Add/Remove..." button on the Metadata Components window in Eclipse. Is there something I can fix to make it stop giving me this message?
 
Package Manifest Content Warning

Exception happened when resolving component type(s), so no component will be added to package manifest editor for these types.
*ExternalDataSource
See log for detail exception messages.

User-added image


I'm not a developer, so I don't know much about eclipse. I'm using eclipse as a way to download the reports my users are using. So I can see what columns and criteria they're using. I just need to be able to pull this information from Salesforce, I won't be pushing any changes from Eclipse back to Salesforce.
I have searched for a while on this topic and have not found a definitive response. If I freeze a user and that user is already logged in, will their current session be frozen?

I believe I can navigate to active sessions and see if they are on from there, but I am curious if freeze user will essentially take care of it in one shot.

Thanks all.
Hi All,

I have requirement like this
 I have one picklist field on the parent object,
 Based on the picklist value i have to display various custom buttons on the related list of child object
 Please help me

Thanks in advance
Very frustrating.
SF team, please heed this suggestion.
Search is uselsess to differentiate between the two.
Could someone that actually has the ability to fix this please respond.
Thanks kindly.
Hi,
It is not a question, I share my experience because I spent hours on this...
on my visualforce page, chrome kept telling me (in the Javascript console):
XMLHttpRequest cannot load https://eu3.salesforce.com/_ui/common/request/servlet/JsLoggingServlet.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'https://c.eu3.visual.force.com' is therefore not allowed access.
Browsing the net, I didn't find info on this error.
At the end, It appears this was due to a call to the "alert" javascript box just before the call to an "<apex:actionFunction". See below,
Javascript is:
function jsRemoveLineItemCatBtn() {
alert( 'CURRENT ID ' + vLICInProgressNum );
afRemoveLineItemCatBtn( String(vLICInProgressNum) );
}
where afRemoveLineItemCatBtn is the name of my action function.
Since I commented the call to alert, I don't have the error message anymore...
Hope to help few to save time.
 
Hi.

In the VF I used the date format as YYYY-MM-dd in the 
<apex:outputText value="{0,date,YYYY/MM/dd}">
Before the last week of the year it was OK. When the new year falls in the  last week of Decemeber comes the issue.
For example
2014:
S   M  T  W Th F Sat
28 29 30 31 1   2 3

In the above calendar 1st Jan of 2015 falls in the Thurusday.So when I viewd the records of 28,29,30 of December 2014 It showed as
2015-12-28
2015-12-29
2015-12-30
2015-12-31

After that I came to know that
@"YYYY" is week-based calendar year.
@"yyyy" is ordinary calendar year.
http://realmacsoftware.com/blog/working-with-date-and-time

cheers
suresh