• kromero
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 7
    Replies
I want to create a custom button on an object that requires a user to add an attachement to the record they are working on or even a button that would say "Save & Add Attachment" and when they save the record it just brings them directly the new attachment standard button for that record. Is that possible or is there another way to require an attachment on a record?
I have a VF Page and am getting this error, "Error: Unknown property 'String.Territory__c'." The error is in reference to the last line in this VF page. Do you know how I would update this? When the user clicks on the link it takes them to a report and I want the report to have the filter updated to show the users territory.

<apex:page sidebar="false" showHeader="false"  controller="CustomLinksController">
<style>

pre.exception {
    font-size: 145%;
}

body, td {
    margin:0px;
    color:#333;
}

body {
    background-repeat: repeat-x;
    background-position: left top;
    font-size: 75%;
    font-family: 'Arial', 'Helvetica', sans-serif;
    background-color: #FFF;
}

a {
    color:#333;
}

a:hover {
    text-decoration:underline;
}

th {
    text-align: left;
    font-weight: bold;
    white-space: nowrap;
}

form {
    margin:0px;
    padding:0px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Verdana', 'Geneva', sans-serif;
    font-size: 100%;
    margin:0px;
    display:inline;
}

.sidebarModule {
    background-color:#E8E8E8;
    margin: 0 0 2px 0;
    overflow: hidden;
}

.sidebarModule .requiredMark {
    color: #E8E8E8; /* Hide in background */
}

.sidebarModuleHeader {
    padding: 15px 8px 2px 15px;
    font-weight: bold;
}

.sidebarModuleBody,
.sidebarModuleBodyNoHeader {
    padding: 0 6px 16px 11px;
}

.sidebarModuleBodyNoHeader {
    padding-top: 15px;
}

.sidebarModuleBody select {
    font-size: 91%;
}

.sidebarModuleTag {
    vertical-align:top;
}

.sidebarModuleTag img {
    padding-right:.5em;
    vertical-align:bottom;
}

/* - Image - */
.imageModule .sidebarModuleBody {
    margin: auto;
    padding-left: 0;
    padding-right: 0;
    width: 185px;
}


/* - Nested Base - */
.nestedModule {
    background-color: #E8E8E8;
    background-image:  url("/img/bgmMessage.gif");
    background-repeat: no-repeat;
    background-position: left top;
    border-color: #E8E8E8; /* Match the background color */
    border-style: solid;
    border-width: 10px 0;
    margin-top: -2px; /* Eat up the margin spacing that's normally present */
    padding:0px 15px 0px 13px;
}

.nestedModuleInner {
    background-color: #FFF;
    margin-bottom: 0;
}

.nestedModule .sidebarModuleHeader {
    padding-top: 7px;
    padding-bottom: 5px;
}

.nestedModule .sidebarModuleBody {
    border-top: 1px solid #CCC;
    line-height:1.6em;
    margin: 0 10px 8px;
    padding: 0px 3px 0 5px;
}

/* - Custom Links - */
.linksModule ul {
    padding: 2px 0 1px 10px;
    margin: 0;
}

.linksModule li {
    list-style: disc;
    padding: 0;
    line-height: 1.3em;
    margin: 0;
}

</style>
<apex:includeScript value="/support/console/26.0/integration.js"/>
<script>
  function reloadWindow(obj){
    
     if (sforce.console.isInConsole()) {
        testGetFocusedPrimaryTabId(obj); 
    }else{
        window.parent.location.href = obj;
    }
       
  }
  
  function testGetFocusedPrimaryTabId(pUrl) {
            
            sforce.console.getFocusedPrimaryTabId(function showTabId(result) {
                //Display the tab ID
                //alert(pUrl);
                result.calledUrl = pUrl;
                //alert('Tab ID: ' + result.id);
                var primaryTabId = result.id;
                sforce.console.openSubtab(primaryTabId , result.calledUrl, true, 
                    'Custom link result', null,openSuccess, 'salesforceSubtab');
            });
        }
       
        var openSuccess = function openSuccess(result) {
            //Report whether we succeeded in opening the subtab
            /*if (result.success == true) {
                alert('subtab successfully opened');
            } else {
                alert('subtab cannot be opened');
            }*/
        };
  
  
  
  
</script>



<div class="nestedModule linksModule" style="width:100%;height:100%;padding:10px" >
    
    <div class="sidebarModule nestedModuleInner" style="width:100%;height:100%">   
        
        <div class="sidebarModuleHeader">
            <h2></h2>
        </div>
        
        <div class="sidebarModuleBody"  >
            <b>  My Daily Priorities   </b>  
            <ul>
            
              <li><a href="#"   onclick="reloadWindow('/00Q?fcf=00B80000008wPmf')">My Open Hot Leads</a><label style="color:red"><b><apex:outputText value=" ({!myOpenHotLeads})" escape="false" /></b></label></li>
              <li><a href="#"   onclick="reloadWindow('/006?fcf=00B80000008Yva9')">My Open Opportunities Closing Today or Earlier</a> <label style="color:red"><b><apex:outputText value=" ({!myOpenOpps})" escape="false" /></b></label></li>
              <li><a href="#" onclick="reloadWindow('/00O80000003OGyO')">My Open tasks</a> <label style="color:red"><b> <apex:outputText value=" ({!myOverdueTasks})" escape="false" /></b></label></li>
              <li><a href="#"   onclick="reloadWindow('/a0T?fcf=00B80000008YvaJ')">My Job Profile Coverage</a> <b><apex:outputText value=" ({!myOpenjbCoverage})" escape="false" /></b></li>
              <li><a href="#"   onclick="reloadWindow('/00Q?fcf=00B800000089HkS')">Open Campaign Leads</a> <label style="color:red"><b><apex:outputText value="({!MyOpenCampaignLeads})" escape="false" /></b></label></li>  
            </ul>
              <br/>
                 <b> Land Based Model Custom Links </b>  
          <ul>
           
           <li><a href="#"   onclick="reloadWindow('/001?fcf=00Be0000001PtnZ')">SPOC Accounts</a> </li>  
           <li><a href="#"   onclick="reloadWindow('/00Q?fcf=00Be0000001Ptnj')">Non-Construction Prospect Leads</a></li>  
            <li><a href="#" onclick="reloadWindow('/00Oe0000000HUtq?pv1={!User.Territory__c}')">Accounts in My Territory</a></li>  
          </ul>

Is it possible to add an image to a visual workflow? The old solution posted in this post no longer works. http://boards.developerforce.com/t5/Visual-Workflow/How-to-add-images-to-flow-screen-in-Flow-Designer/m-p/413871#M288

I would like to display an image next to a large amount of text. I've tried using the apex:column, but it requires a data table. I'm not referencing any data and don't need a table, I'm just trying to display an image next the text.

 

I'm able to display the image above the text, but would really like to display it next to the text instead. I'm new to VF so I'm not sure if this is possible. Are there any suggestions on how to complete this?

When we send out emails to customers they have the option to opt-out of recieving future emails. If they click on this link then a custom field "unsubscribe date" within our custom object "message statistics" is automatically updated.

 

Does anyone have suggestions for writing a trigger that once the "unsubscribe date" field within the "message statistics" custom object is filled out then the "opt-out" checkbox within the "contact" object will become checked?

 

Any suggestions are appreciated as I'm just beginning to learn about Apex code.

I have a VF Page and am getting this error, "Error: Unknown property 'String.Territory__c'." The error is in reference to the last line in this VF page. Do you know how I would update this? When the user clicks on the link it takes them to a report and I want the report to have the filter updated to show the users territory.

<apex:page sidebar="false" showHeader="false"  controller="CustomLinksController">
<style>

pre.exception {
    font-size: 145%;
}

body, td {
    margin:0px;
    color:#333;
}

body {
    background-repeat: repeat-x;
    background-position: left top;
    font-size: 75%;
    font-family: 'Arial', 'Helvetica', sans-serif;
    background-color: #FFF;
}

a {
    color:#333;
}

a:hover {
    text-decoration:underline;
}

th {
    text-align: left;
    font-weight: bold;
    white-space: nowrap;
}

form {
    margin:0px;
    padding:0px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Verdana', 'Geneva', sans-serif;
    font-size: 100%;
    margin:0px;
    display:inline;
}

.sidebarModule {
    background-color:#E8E8E8;
    margin: 0 0 2px 0;
    overflow: hidden;
}

.sidebarModule .requiredMark {
    color: #E8E8E8; /* Hide in background */
}

.sidebarModuleHeader {
    padding: 15px 8px 2px 15px;
    font-weight: bold;
}

.sidebarModuleBody,
.sidebarModuleBodyNoHeader {
    padding: 0 6px 16px 11px;
}

.sidebarModuleBodyNoHeader {
    padding-top: 15px;
}

.sidebarModuleBody select {
    font-size: 91%;
}

.sidebarModuleTag {
    vertical-align:top;
}

.sidebarModuleTag img {
    padding-right:.5em;
    vertical-align:bottom;
}

/* - Image - */
.imageModule .sidebarModuleBody {
    margin: auto;
    padding-left: 0;
    padding-right: 0;
    width: 185px;
}


/* - Nested Base - */
.nestedModule {
    background-color: #E8E8E8;
    background-image:  url("/img/bgmMessage.gif");
    background-repeat: no-repeat;
    background-position: left top;
    border-color: #E8E8E8; /* Match the background color */
    border-style: solid;
    border-width: 10px 0;
    margin-top: -2px; /* Eat up the margin spacing that's normally present */
    padding:0px 15px 0px 13px;
}

.nestedModuleInner {
    background-color: #FFF;
    margin-bottom: 0;
}

.nestedModule .sidebarModuleHeader {
    padding-top: 7px;
    padding-bottom: 5px;
}

.nestedModule .sidebarModuleBody {
    border-top: 1px solid #CCC;
    line-height:1.6em;
    margin: 0 10px 8px;
    padding: 0px 3px 0 5px;
}

/* - Custom Links - */
.linksModule ul {
    padding: 2px 0 1px 10px;
    margin: 0;
}

.linksModule li {
    list-style: disc;
    padding: 0;
    line-height: 1.3em;
    margin: 0;
}

</style>
<apex:includeScript value="/support/console/26.0/integration.js"/>
<script>
  function reloadWindow(obj){
    
     if (sforce.console.isInConsole()) {
        testGetFocusedPrimaryTabId(obj); 
    }else{
        window.parent.location.href = obj;
    }
       
  }
  
  function testGetFocusedPrimaryTabId(pUrl) {
            
            sforce.console.getFocusedPrimaryTabId(function showTabId(result) {
                //Display the tab ID
                //alert(pUrl);
                result.calledUrl = pUrl;
                //alert('Tab ID: ' + result.id);
                var primaryTabId = result.id;
                sforce.console.openSubtab(primaryTabId , result.calledUrl, true, 
                    'Custom link result', null,openSuccess, 'salesforceSubtab');
            });
        }
       
        var openSuccess = function openSuccess(result) {
            //Report whether we succeeded in opening the subtab
            /*if (result.success == true) {
                alert('subtab successfully opened');
            } else {
                alert('subtab cannot be opened');
            }*/
        };
  
  
  
  
</script>



<div class="nestedModule linksModule" style="width:100%;height:100%;padding:10px" >
    
    <div class="sidebarModule nestedModuleInner" style="width:100%;height:100%">   
        
        <div class="sidebarModuleHeader">
            <h2></h2>
        </div>
        
        <div class="sidebarModuleBody"  >
            <b>  My Daily Priorities   </b>  
            <ul>
            
              <li><a href="#"   onclick="reloadWindow('/00Q?fcf=00B80000008wPmf')">My Open Hot Leads</a><label style="color:red"><b><apex:outputText value=" ({!myOpenHotLeads})" escape="false" /></b></label></li>
              <li><a href="#"   onclick="reloadWindow('/006?fcf=00B80000008Yva9')">My Open Opportunities Closing Today or Earlier</a> <label style="color:red"><b><apex:outputText value=" ({!myOpenOpps})" escape="false" /></b></label></li>
              <li><a href="#" onclick="reloadWindow('/00O80000003OGyO')">My Open tasks</a> <label style="color:red"><b> <apex:outputText value=" ({!myOverdueTasks})" escape="false" /></b></label></li>
              <li><a href="#"   onclick="reloadWindow('/a0T?fcf=00B80000008YvaJ')">My Job Profile Coverage</a> <b><apex:outputText value=" ({!myOpenjbCoverage})" escape="false" /></b></li>
              <li><a href="#"   onclick="reloadWindow('/00Q?fcf=00B800000089HkS')">Open Campaign Leads</a> <label style="color:red"><b><apex:outputText value="({!MyOpenCampaignLeads})" escape="false" /></b></label></li>  
            </ul>
              <br/>
                 <b> Land Based Model Custom Links </b>  
          <ul>
           
           <li><a href="#"   onclick="reloadWindow('/001?fcf=00Be0000001PtnZ')">SPOC Accounts</a> </li>  
           <li><a href="#"   onclick="reloadWindow('/00Q?fcf=00Be0000001Ptnj')">Non-Construction Prospect Leads</a></li>  
            <li><a href="#" onclick="reloadWindow('/00Oe0000000HUtq?pv1={!User.Territory__c}')">Accounts in My Territory</a></li>  
          </ul>

Is it possible to add an image to a visual workflow? The old solution posted in this post no longer works. http://boards.developerforce.com/t5/Visual-Workflow/How-to-add-images-to-flow-screen-in-Flow-Designer/m-p/413871#M288

When we send out emails to customers they have the option to opt-out of recieving future emails. If they click on this link then a custom field "unsubscribe date" within our custom object "message statistics" is automatically updated.

 

Does anyone have suggestions for writing a trigger that once the "unsubscribe date" field within the "message statistics" custom object is filled out then the "opt-out" checkbox within the "contact" object will become checked?

 

Any suggestions are appreciated as I'm just beginning to learn about Apex code.