• Ed055
  • NEWBIE
  • 235 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 65
    Questions
  • 46
    Replies
Hi all  -  I need help with apex and soql
Account object has a custom date field called "Last followup"
I would like to update this field on insert/edit/update/delete of CONTACT. I have a contact trigger and "Last followup" needs to be updated in this trigger
"Last followup" field on account object should be updated with  MAX of  ActivityDate field FROM  ActivityHistories object.of all contacts tied to that account.. As per my understanding, ActivityHistories  records can only be queried as a subquery.

Thanks for help


 
Hi All -  I need help coding custom VF page.  
Users will come to this VF page(AssignContact) with url something like apex/AssignContact?ID=066540000000XzK
The ID that is passed in the URL is one of  the record  in my custom object(Team__c)
On this custom VF page I need a Contact lookup field which the users can lookup a particular contact , select and click save button
when users click save I would like the contact record that user selected be added to my  custom object(Team) 
Thanks for your help.  




 
I'm trying to create a custom link button with "execute javascript" behavior. I'm getting error on line 
var cont = records[0].top_firm__r.Coverage_Channel__c;

Coverage_Channel__c is a picklist type field. Query using dev console does not throw an error and there is a value in that field. Also, I see values by doing the console.log(records );  I'm not quite sure why it throws  error "cannot read property 'Coerage_Channel__c' of undefined "
 
{!REQUIRESCRIPT("/soap/ajax/34.0/connection.js")}

 
    var result = sforce.connection.query(
        "SELECT Name,top_firm__r.Coverage_Channel__c " + 
        "FROM Contact " + 
        "WHERE Id = '{!Contact.Id}' " 
    );

    var records = result.getArray("records");

 
    if(records.length != 0){
        var cont = records[0].top_firm__r.Coverage_Channel__c;
window.top.location.href="someting........";
        }

 
I have a custom object called "Request" and that has lookup relationship with contact. Contact has a field called "topParent"  which has lookup relationship to an ACCOUNT . I have a custom field in account called CHANNEL .

I want to use a custom button when user clicks "New"  in the "Request" related list on contact page .  I have created a custom button called "New Request" on "Request" object. I'm trying to access CHANNEL(which is at account level) field in this custom button by doing {Contact.topParent __r.Channel__c} .. but it throws "field does not exist error" when I try to save.   Not sure if I'm missing something. 

Thanks.
I have a custom object with some text fields. I created a custom VF page . I want to prepoulate one of the fields with some value. I refered the URL hacking mentioned here http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html

I created a custom new link button and passing (&00N29000000Jat5=test) the value that I want prepoluated. The issue I'm having is that the field does not prepoulate  when in NEW mode. It does however populate the value in EDIT mode. This tells me that the ID of the field is correct , but not sure wht is going on. 

Thanks.
I have a custom object which has lookup relationship with Account and Contact. On the account and contact page I have related list to that object. I have created 2 VF pages to display fields related to this custom object in the format I want. One of the VF page is for users who click on edit/new/view in the related list of the custom object on Account page and other is if the user comes from Contact page.
I'm trying to figure out how to redirect user to a particuar VF page depending on whether they click view/edit/new in the related list on Account or Contact page. 

Thanks for help.
I'm trying to show all contacts related to child accounts at parent account level. I created a custom account lookup field on contact. When I try to add or edit a contact and select the name of my parent account in the custom lookup field, it does not save. Not sure what is going on. Any suggestions

Thanks for help.
 
I have a custom object A. One of the field on custom object is of type master-Detail(account). On the account page layout I added this related list but cannot see this field in related list properties. I'm able to include all other fields.
Thanks for help.
 
I'm trying to create asimple validation rule such that when an user is trying ot convert lead and enters "System" in the the "Record Owner" file, it should display error. Formula I'm using is  - >  Owner:User.LastName='System'
System is an integration user and does not have first name in the user profile.
1. I'm not sure why the formula is not working . Joshn Smith is valid user .
2. Why does the error keeps displaying below the "convert" field when I mentioned in the validation rule to display the erorr next to lead owner field. (screenshot below)

User-added image

Thanks
I'm trying to pull all the users who have not posted anything (user feed , group feed etc) on chatter. Is there a way to query SOSQL  or report to find out users who have never posted anything on chatter. Thanks.