• Matt Hewson
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
We have a requirement where we need to select multiple addresses from many child accounts linked to the parent account where a quote/opportunity is being generated and add them to the quote/opportunity.  For example, an opportunity/quote may be created for a parent account but the product will be installed at 5 of its child account locations. We need to be able to select the child addresses and add them to the opportunity/quote for as many locations that the item will be installed at.  Even being able to select multiple child account names to the opportunity/quote would be enough to meet our requirements.

Thanks in advance and if this doesn't make any sense, please let me know and I will be happy to answer any questions you may have to give more clarity.

Matt
Hi, I am trying to use a custom button for my account that calls an email template with merge fields and emails to the account owner requested information based on fields defined on the account.

{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
(function() {
sforce.connection.sessionId = "{!$Api.Session_ID}";

var message = new sforce.SingleEmailMessage();
message.replyTo = "noone@who.com";
message.ccAddresses = "noone@who.com";
message.targetObjectId = "{!Account.OwnerId}";
message.templateId = "xxxxxxxxxxxxx";
message.saveAsActivity = false;
var result = sforce.connection.sendEmail([message]);
  if(result[0].success == 'true') {
     alert("Email Sent");
  } else {
     alert("Something went wrong");
  }
alert(result);
}());

~~~~~ Email Template ~~~~~

Hi {!Account.OwnerFirstName},


Please can you provide the following information to Compliance for {!Account.Name}.

{!IF(!Account.Affidavit_Required__c="true", "", "Affidavit")}

{!IF(!Account.License_Required__c="true", "", "License")}

If you have any questions please contact the Compliance Manager.

Many Thanks,

Compliance

~~~~~ END ~~~~~

However, the emails come through blank where I expect to see merge field values and the IF statements don't work as values are not being passed. I have tried using whatId but it returned "whatId is an INVALID_ID_FIELD" error.

Please, can someone assist with getting to a suitable resolution?

Thanks in advance,

Matt
Not used Apex triggers before but I would like to use one to update a custom field with the user's name who checked the checkbox.

Object - Account (new and existing)
Checkbox - Verified
Custom Field - Verified_By

Any assistance would be greatly appreciated.

Thanks in advance
If I wanted to force users to validate accounts before they can create an opportunity, how would I do so?  I would only want to apply this rule to accounts that have not been updated for a period of time.

Thanks in advance for any support given.

Matt
When adding products to an Opportunity the list is not sorted alphabetically.  How can I update this list view to display all my product alphabetically rather than randomly as the appear below?

User-added image

This is my Apex code where it brings in the product list.

<apex:outputLabel value="Product Name" for="productName"/> <apex:selectList id="productName" value="{!PricebookEntrys}" size="1" required="true"> <apex:selectOptions value="{!items}"/> </apex:selectList>

Can anyone help sort the products alphabetically?

Thanks in advance for any assistance
Not used Apex triggers before but I would like to use one to update a custom field with the user's name who checked the checkbox.

Object - Account (new and existing)
Checkbox - Verified
Custom Field - Verified_By

Any assistance would be greatly appreciated.

Thanks in advance
When adding products to an Opportunity the list is not sorted alphabetically.  How can I update this list view to display all my product alphabetically rather than randomly as the appear below?

User-added image

This is my Apex code where it brings in the product list.

<apex:outputLabel value="Product Name" for="productName"/> <apex:selectList id="productName" value="{!PricebookEntrys}" size="1" required="true"> <apex:selectOptions value="{!items}"/> </apex:selectList>

Can anyone help sort the products alphabetically?

Thanks in advance for any assistance