• Shane Quiring
  • NEWBIE
  • 70 Points
  • Member since 2014
  • Salesforce Administrator
  • CyberArk


  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 16
    Replies
Hi, 

Currently we are using cases for submitting a Pricing Request to our Pricing Team. They, the Pricing Team, would like to know how many times that the Pricing Request has been submitted.

My thought would be to use WF Rule to accomplish this, for example if the owner is a Queue then a WF Rule would Check Mark a box, which is where the initial submission of the Case goes to.

Here is my question/s: Would I need to use a check mark box for part of the formula to update the count or could I get away with not using the check mark box?  Of course the Check Mark Box would be updated by another WF Rule when the Case was submitted/assigned. Here is the formula that I was thinking of using:

if( Submitted_to_Pricing = True, Number_of_Submissions__c+1,0)

Or am I totaled off base and would need to use an APEX Trigger to do the counting?

Any help or advice would be greatly appreciated, thank-you.
Hello Experts:

I have a Date formula issue. The following date formula is not subtract a year when the date is in January:

If ( Resign_Due__c = True, 
DATE ( 

/*YEAR*/ 
YEAR ( Resign_Date__c ) + FLOOR ( (Month (Resign_Date__c ) - Subtraction_Month__c - 1)/12), 

/*MONTH*/ 
CASE ( MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c, 12 ),0,12,MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c, 12 )), 

/*DAY*/ 
MIN ( DAY (Resign_Date__c), 
CASE ( MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c,12 ) ,9,30,4,30,6,30,11,30,2, 

/* return max days for February dependent on if end date is leap year */ 
IF ( MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 400 ) = 0 || ( MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 4 ) = 0 && MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 100 ) <> 0 

, 29,28) 

,31 ) ) 
), 
NUll 
)

Addtional information: 
The Subtraction Month is either a 1 or 2, depending if the value is either gas or electric, Gas is 2 and Electric is 1.
And unfortunately this date formula is causing a big error in my system. It is proably something easy that I am missing. 

Thank-you.

v/r
Shane Quiring
Hi Experts,

How do I look-up (reference) the Flow Process ID (aka the Process Builder Process)? I am trying to trouble shoot a couple of flows.

v/r
Shane Quiring
Hi Experts,

I need some assitance with a date formula. I trying to calculate the number of months left between two dates, start and end date. I currently have the folloiwng formula:

(Custom_End_Date__c - today ())/30

Which will give me the number of days left and if I divide the number by 30 and I should get the numbner of months. Unfortunately I am short by one month. For example if I have a end date of 12/01/2015 minus today, 30 July, would give me 124 days. If I divide that by 30 I get 4 months, or more exactly 4.13 months. But from July to Dec is 5 months.

Any assistance would be greatly appreciated.

Thank-you
Hi Experts,

I really need some help here, I have a SOQL statement the grads a specific list of records and child records, but I need to edit the statement to only include those child records that are currently active, I have a check mark box called "Active" on the child record.

Here is my statment:

<soql>select LDC_Account_Number__c, meter_number__c from meter__c where ldc_account__c in (select id from ldc_account__c where opportunity__c='{!ServiceContract.opportunity__r.id}') order by ldc_account_number__c</soql>

meter__c is the child record
name of the field is Active__c

This is only my 5th SOQL statement, still learning, any assistance would be greatly appreciated. 

Thank-you
Hi Experts,

Does anyone know of a way to attach files, to an e-mail, from notes and attachments? Instead of downloading the attachement to the hard drive and uploading to the e-mail.

Any help would be greatly appreciated, thank-you.

v/r
Shane Quiring
Hello Experts,

I am having an issue with a formula. Here is the concept, to subtract a certain number of months, determined by a number formula field, from a specific date. Here is the issue: the formula does subtract the month just not the year. For example if my date is 01/01/2015 and I need to subtract a month then the date should 12/01/2014. What is actually happening is the formula is subtracting the month but the year is the same, so I get (if my date is 01/01/2015 and subtract 1 month) 12/01/2015. I have searched far and wide and have not seen a resolution. I have seen resolutions for adding months and you would think that changing the "+" to " - " would reverse the action, it does, but it does not subtract the year. Here are the formulas that I have tried:

Currently using:
If ( Resign_Due__c = True,
DATE (

/*YEAR*/
YEAR ( Resign_Date__c ) + FLOOR ( (MONTH (Resign_Date__c ) - Subtraction_Month__c - 1)/12),

/*MONTH*/
CASE ( MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c, 12 ),0,12,MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c, 12 )),

/*DAY*/
MIN ( DAY (Resign_Date__c),
CASE ( MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c,12 ) ,9,30,4,30,6,30,11,30,2,

/* return max days for February dependent on if end date is leap year */
IF ( MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 400 ) = 0 || ( MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 4 ) = 0 && MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 100 ) <> 0
)
, 29,28)

,31 ) )
),
NUll
)

Have tried also:
DATE( 
year( Start_Date__c ) 
+ floor((month(Start_Date__c) - No_of_Months__c )/12) + if(and(month(Start_Date__c)=12, No_of_Months__c >=12),-1,0), 
if( mod( month(Start_Date__c) - No_of_Months__c , 12 ) = 0, 12 , mod( month(Start_Date__c) - No_of_Months__c , 12 )), 
min(day(Start_Date__c), 
case(max( mod( month(Start_Date__c) - No_of_Months__c , 12 ) , 1), 
9,30, 
4,30, 
6,30, 
11,30, 
2,28, 
31 


)

The Second formula returns an error. Any help would be greatly appreciated.

v/r
Shane
Hello Experts,

I am writing a VF Page (Tabbed) and I am working with Service Contracts. I have a related list for a related Service Contract on the Service Contract. Different records types of course. I keep getting the error: 'ServiceContract' is not a valid child relationship name for entity Service Contract. Here is the coding:

<apex:page standardController="ServiceContract" showHeader="true" 
        tabStyle="servicecontract" >
<center>
        <apex:outputPanel style="background-color:red;width:100%;padding:20px;" 
    rendered="{!ServiceContract.Record_Type_Name__c=='Client Contract'}">
    <style>
h1 {
    font-size: 20px;
}
</style> 
        <h1>CLIENT CONTRACT!</h1>
    </apex:outputPanel>
    </center>
    <center>
        <apex:outputPanel style="background-color:red;width:100%;padding:20px;" 
    rendered="{!ServiceContract.Record_Type_Name__c=='Supplier Contract'}">
    <style>
h2 {
    font-size: 20px;
}
</style> 
        <h2>SUPPLIER CONTRACT!</h2>
    </apex:outputPanel>
    </center>
        <style>
      .activeTab {background-color: #236FBD; color:white; 
         background-image:none}
      .inactiveTab { background-color: lightgrey; color:black; 
         background-image:none}
   </style>
   <apex:tabPanel switchType="client" selectedTab="tabdetails" 
                  id="ServiceAccountTabPanel" tabClass="activeTab" 
                  inactiveTabClass="inactiveTab">   
      <apex:tab label="Details" name="ServiceAcctDetails" id="tabdetails">
         <apex:detail relatedList="false" title="true"/>
      </apex:tab>
      <apex:tab label="Approval History" name="ApprovalHistory"
                 id="tabApprovalHist">
          <apex:relatedList subject="{!servicecontract}"
                          list="ProcessSteps" />
      </apex:tab>
            <apex:tab label="Notes and Attachments" name="NotesAndAttachments"
                 id="tabNotesAndAttachments">
          <apex:relatedList subject="{!servicecontract}"
                          list="CombinedAttachments" />
      </apex:tab>
            <apex:tab label="Field History" name="FieldHistory" 
                id="fieldhistory">
<apex:outputLink value="https://cs9.salesforce.com/_ui/common/history/ui/EntityHistoryFilterPage?id={!servicecontract.id}">
click to view field history
    </apex:outputLink>
        </apex:tab>
        <apex:tab label="Supplier Contracts" name="SupplierContracts"
                 id="tabSupplierContracts">
          <apex:relatedList subject="{!servicecontract}"
                          list="ServiceContract" />
      </apex:tab>
      </apex:tabPanel>
</apex:page>

The related list exists on the page layout and all users have acces to it. Does anyone know the Child Relationship name for Service Contracts? Any assistance would be greatly apperciated, thank-you.

v/r
Shane
Hello Experts,

I am new to APEX coding and Visualforce Pages, but learning. I am having a bit of an issue with a VF page. I am trying to refrence either the record type ID or the record type name in an "IF" statement. Here is what I am trying to do, if the record type id equals a certain ID then show "Supplier Contract" else "Client Contract". I am of course running into an error. Here is the error and the coding:

Error: "Error: Unknown property 'ServiceContractStandardController.RecordType'"

Coding:
<apex:page standardController="ServiceContract" showHeader="true" 
        tabStyle="servicecontract" >
        <center>
        <apex:outputPanel style="background-color:red;width:100%;padding:20px;" 
    rendered="{!IF(RecordType.Id=='012K00000008w7q',h1,h2)}">
       <style>
h1 {
    font-size: 20px;
}
</style> 
        <h1>SUPPLIER ACCOUNT</h1>
        <style>
h2 {
    font-size: 20px;
}
</style>
        <h2>CLIENT CONTRACT</h2>
       </apex:outputPanel>
    </center>
        <style>
      .activeTab {background-color: #236FBD; color:white; 
         background-image:none}
      .inactiveTab { background-color: lightgrey; color:black; 
         background-image:none}
   </style>
   <apex:tabPanel switchType="client" selectedTab="tabdetails" 
                  id="ServiceAccountTabPanel" tabClass="activeTab" 
                  inactiveTabClass="inactiveTab">   
      <apex:tab label="Details" name="ServiceAcctDetails" id="tabdetails">
         <apex:detail relatedList="false" title="true"/>
      </apex:tab>
      <apex:tab label="Approval History" name="ApprovalHistory"
                 id="tabApprovalHist">
          <apex:relatedList subject="{!servicecontract}"
                          list="ProcessSteps" />
      </apex:tab>
            <apex:tab label="Notes and Attachments" name="NotesAndAttachments"
                 id="tabNotesAndAttachments">
          <apex:relatedList subject="{!servicecontract}"
                          list="CombinedAttachments" />
      </apex:tab>
            <apex:tab label="Field History" name="FieldHistory" 
                id="fieldhistory">
<apex:outputLink value="https://cs9.salesforce.com/_ui/common/history/ui/EntityHistoryFilterPage?id={!servicecontract.id}">
click to view field history
</apex:outputLink>
</apex:tab>
      </apex:tabPanel>
</apex:page>

Any Assistance would greatly apprecitated, thank-you. 

v/r
Shane
Hello Experts,

I am extremely new to the APEX Coding and to Visualforce Pages. I am trying to write, or find, an easy way to create a Red Banner, or Scrolling Marque, for my Account pages. Here is what I am trying to do or need:

If a field, Total_Elec_Gas_Avg_Usage__c, is greater or equal to 100,000, then I would like a Banner that states that the company is a "Key Account". You would think that this would be easy to code for. During my search the only thing that I have found is the following:

""the page will something like
<apex:page standardController="Account">
     <b>PUT YOUR TEXT HERE</b>
</apex:page>

and then use this visualforce page at the top of your Account's Page Layout."

Alas, this gives me an error. Now of course I did add it to my profile but still received an error. I would like to keep this as simple as possible. Now I could and am using an image formula for my list views, but I need something more prominent for my Account pages.

Any help would be greatly appreciated, thank-you.

Shane
Ok I am trying to change a time value, in a text field ("10:00") into a numerical value. Currently I keep running into an error when I place in a " : " and use the "Value" function in my formula.

So here is the basic concept: The sales rep sets their meeting time (date and time in two separate fields, text field for time and date field for date) with a customer, depending on the time and the day, will depend on when my pricing team will need to get the pricing back to the sales rep. For example if the meeting date and time is on the 12th of May and the Meeting time is at 1pm, then the pricing team will need to get the pricing to the sales rep at 12pm on the 12th of May. But if the meeting time is before 11am then the pricing team need to get to them a day prior. Of course this all has to happen on the business day. everything works fine until you use the " : " for the time value (naturally we are using military time aka 24hr clock instead of the 12hr clock, makes my life easier), but if I use a " . ", for example "12.15" instead of "12:15" the formula works like a charm.

So here is my question, wth is up with the " : "?

Of course they would like to use the " : " instead of the " .". Any suggestions? Below is my two formula’s that I am using in a workflow rule field update (in order to get around the holidays I created an additional formula that caculates the day of the week):

Supplier Due Time:
IF( Meeting_Day_of_the_Week__c = "Monday",
Text(Value(Meeting_Time__c)-1),
IF( Meeting_Day_of_the_Week__c = "Tuesday" &&
Value(Meeting_Time__c) <= 11,
"4pm",
IF( Meeting_Day_of_the_Week__c = "Tuesday" &&
Value(Meeting_Time__c) > 11,
Text(Value(Meeting_Time__c)-1),
If (Meeting_Day_of_the_Week__c = "Wednesday" &&
Value(Meeting_Time__c) <= 11,
"4pm",
IF( Meeting_Day_of_the_Week__c = "Wednesday" &&
Value(Meeting_Time__c) > 11,
Text(Value(Meeting_Time__c)-1),
If (Meeting_Day_of_the_Week__c = "Thursday" &&
Value(Meeting_Time__c) <= 11,
"4pm",
IF( Meeting_Day_of_the_Week__c = "Thursday" &&
Value(Meeting_Time__c) > 11,
Text(Value(Meeting_Time__c)-1),
If (Meeting_Day_of_the_Week__c = "Friday" &&
Value(Meeting_Time__c) <= 11,
"4pm",
IF (Meeting_Day_of_the_Week__c = "Friday" &&
Value(Meeting_Time__c) > 11,
Text(Value(Meeting_Time__c)-1),
Null
)))))))))

Supplier Date:
IF( Meeting_Day_of_the_Week__c = "Monday",
Meeting_Date__c,
IF( Meeting_Day_of_the_Week__c = "Tuesday" &&
Value(Meeting_Time__c) <= 11,
Meeting_Date__c -1,
IF( Meeting_Day_of_the_Week__c = "Tuesday" &&
Value(Meeting_Time__c) > 11,
Meeting_Date__c,
If (Meeting_Day_of_the_Week__c = "Wednesday" &&
Value(Meeting_Time__c) <= 11,
Meeting_Date__c -1,
IF( Meeting_Day_of_the_Week__c = "Wednesday" &&
Value(Meeting_Time__c) > 11,
Meeting_Date__c,
If (Meeting_Day_of_the_Week__c = "Thursday" &&
Value(Meeting_Time__c) <= 11,
Meeting_Date__c -1,
IF( Meeting_Day_of_the_Week__c = "Thursday" &&
Value(Meeting_Time__c) > 11,
Meeting_Date__c,
If (Meeting_Day_of_the_Week__c = "Friday" &&
Value(Meeting_Time__c) <= 11,
Meeting_Date__c -1,
IF( Meeting_Day_of_the_Week__c = "Friday" &&
Value(Meeting_Time__c) > 11,
Meeting_Date__c,
Null
)))))))))
Hi, I am very very new to APEX, but not new to Salesforce. I need to auto populate a picklist field on related obect from the parent object, due to the other picklist field is a controlling field for another multi-select picklist field. Here are the details: I would like to take the "BillingState" field from Accounts and use the value there to autopopluate a picklist field, "State__c" on Cases then pass the information to the field "Customer_State__c" on my custom object, Internal_Buy_Rate__c. I did find the following answer, https://developer.salesforce.com/forums/ForumsMain?id=906F000000093U9IAI, I am stuck on how to modify this to suit my purposes for the text field from accounts and than pass that information down to my related objects. Any help would be greatly appreciated. 

Thank-you.

Shane
Hi Experts,

I need some assitance with a date formula. I trying to calculate the number of months left between two dates, start and end date. I currently have the folloiwng formula:

(Custom_End_Date__c - today ())/30

Which will give me the number of days left and if I divide the number by 30 and I should get the numbner of months. Unfortunately I am short by one month. For example if I have a end date of 12/01/2015 minus today, 30 July, would give me 124 days. If I divide that by 30 I get 4 months, or more exactly 4.13 months. But from July to Dec is 5 months.

Any assistance would be greatly appreciated.

Thank-you
Hi Experts,

Does anyone know of a way to attach files, to an e-mail, from notes and attachments? Instead of downloading the attachement to the hard drive and uploading to the e-mail.

Any help would be greatly appreciated, thank-you.

v/r
Shane Quiring
Hello Experts:

I have a Date formula issue. The following date formula is not subtract a year when the date is in January:

If ( Resign_Due__c = True, 
DATE ( 

/*YEAR*/ 
YEAR ( Resign_Date__c ) + FLOOR ( (Month (Resign_Date__c ) - Subtraction_Month__c - 1)/12), 

/*MONTH*/ 
CASE ( MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c, 12 ),0,12,MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c, 12 )), 

/*DAY*/ 
MIN ( DAY (Resign_Date__c), 
CASE ( MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c,12 ) ,9,30,4,30,6,30,11,30,2, 

/* return max days for February dependent on if end date is leap year */ 
IF ( MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 400 ) = 0 || ( MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 4 ) = 0 && MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 100 ) <> 0 

, 29,28) 

,31 ) ) 
), 
NUll 
)

Addtional information: 
The Subtraction Month is either a 1 or 2, depending if the value is either gas or electric, Gas is 2 and Electric is 1.
And unfortunately this date formula is causing a big error in my system. It is proably something easy that I am missing. 

Thank-you.

v/r
Shane Quiring
Hi Experts,

I need some assitance with a date formula. I trying to calculate the number of months left between two dates, start and end date. I currently have the folloiwng formula:

(Custom_End_Date__c - today ())/30

Which will give me the number of days left and if I divide the number by 30 and I should get the numbner of months. Unfortunately I am short by one month. For example if I have a end date of 12/01/2015 minus today, 30 July, would give me 124 days. If I divide that by 30 I get 4 months, or more exactly 4.13 months. But from July to Dec is 5 months.

Any assistance would be greatly appreciated.

Thank-you
Hi Experts,

I really need some help here, I have a SOQL statement the grads a specific list of records and child records, but I need to edit the statement to only include those child records that are currently active, I have a check mark box called "Active" on the child record.

Here is my statment:

<soql>select LDC_Account_Number__c, meter_number__c from meter__c where ldc_account__c in (select id from ldc_account__c where opportunity__c='{!ServiceContract.opportunity__r.id}') order by ldc_account_number__c</soql>

meter__c is the child record
name of the field is Active__c

This is only my 5th SOQL statement, still learning, any assistance would be greatly appreciated. 

Thank-you
Hi Experts,

Does anyone know of a way to attach files, to an e-mail, from notes and attachments? Instead of downloading the attachement to the hard drive and uploading to the e-mail.

Any help would be greatly appreciated, thank-you.

v/r
Shane Quiring
Hello Experts,

I am having an issue with a formula. Here is the concept, to subtract a certain number of months, determined by a number formula field, from a specific date. Here is the issue: the formula does subtract the month just not the year. For example if my date is 01/01/2015 and I need to subtract a month then the date should 12/01/2014. What is actually happening is the formula is subtracting the month but the year is the same, so I get (if my date is 01/01/2015 and subtract 1 month) 12/01/2015. I have searched far and wide and have not seen a resolution. I have seen resolutions for adding months and you would think that changing the "+" to " - " would reverse the action, it does, but it does not subtract the year. Here are the formulas that I have tried:

Currently using:
If ( Resign_Due__c = True,
DATE (

/*YEAR*/
YEAR ( Resign_Date__c ) + FLOOR ( (MONTH (Resign_Date__c ) - Subtraction_Month__c - 1)/12),

/*MONTH*/
CASE ( MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c, 12 ),0,12,MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c, 12 )),

/*DAY*/
MIN ( DAY (Resign_Date__c),
CASE ( MOD ( MONTH (Resign_Date__c)- Subtraction_Month__c,12 ) ,9,30,4,30,6,30,11,30,2,

/* return max days for February dependent on if end date is leap year */
IF ( MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 400 ) = 0 || ( MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 4 ) = 0 && MOD ( YEAR (Resign_Date__c) + FLOOR ( (MONTH (Resign_Date__c) - Subtraction_Month__c)/12) , 100 ) <> 0
)
, 29,28)

,31 ) )
),
NUll
)

Have tried also:
DATE( 
year( Start_Date__c ) 
+ floor((month(Start_Date__c) - No_of_Months__c )/12) + if(and(month(Start_Date__c)=12, No_of_Months__c >=12),-1,0), 
if( mod( month(Start_Date__c) - No_of_Months__c , 12 ) = 0, 12 , mod( month(Start_Date__c) - No_of_Months__c , 12 )), 
min(day(Start_Date__c), 
case(max( mod( month(Start_Date__c) - No_of_Months__c , 12 ) , 1), 
9,30, 
4,30, 
6,30, 
11,30, 
2,28, 
31 


)

The Second formula returns an error. Any help would be greatly appreciated.

v/r
Shane
Hello Experts,

I am writing a VF Page (Tabbed) and I am working with Service Contracts. I have a related list for a related Service Contract on the Service Contract. Different records types of course. I keep getting the error: 'ServiceContract' is not a valid child relationship name for entity Service Contract. Here is the coding:

<apex:page standardController="ServiceContract" showHeader="true" 
        tabStyle="servicecontract" >
<center>
        <apex:outputPanel style="background-color:red;width:100%;padding:20px;" 
    rendered="{!ServiceContract.Record_Type_Name__c=='Client Contract'}">
    <style>
h1 {
    font-size: 20px;
}
</style> 
        <h1>CLIENT CONTRACT!</h1>
    </apex:outputPanel>
    </center>
    <center>
        <apex:outputPanel style="background-color:red;width:100%;padding:20px;" 
    rendered="{!ServiceContract.Record_Type_Name__c=='Supplier Contract'}">
    <style>
h2 {
    font-size: 20px;
}
</style> 
        <h2>SUPPLIER CONTRACT!</h2>
    </apex:outputPanel>
    </center>
        <style>
      .activeTab {background-color: #236FBD; color:white; 
         background-image:none}
      .inactiveTab { background-color: lightgrey; color:black; 
         background-image:none}
   </style>
   <apex:tabPanel switchType="client" selectedTab="tabdetails" 
                  id="ServiceAccountTabPanel" tabClass="activeTab" 
                  inactiveTabClass="inactiveTab">   
      <apex:tab label="Details" name="ServiceAcctDetails" id="tabdetails">
         <apex:detail relatedList="false" title="true"/>
      </apex:tab>
      <apex:tab label="Approval History" name="ApprovalHistory"
                 id="tabApprovalHist">
          <apex:relatedList subject="{!servicecontract}"
                          list="ProcessSteps" />
      </apex:tab>
            <apex:tab label="Notes and Attachments" name="NotesAndAttachments"
                 id="tabNotesAndAttachments">
          <apex:relatedList subject="{!servicecontract}"
                          list="CombinedAttachments" />
      </apex:tab>
            <apex:tab label="Field History" name="FieldHistory" 
                id="fieldhistory">
<apex:outputLink value="https://cs9.salesforce.com/_ui/common/history/ui/EntityHistoryFilterPage?id={!servicecontract.id}">
click to view field history
    </apex:outputLink>
        </apex:tab>
        <apex:tab label="Supplier Contracts" name="SupplierContracts"
                 id="tabSupplierContracts">
          <apex:relatedList subject="{!servicecontract}"
                          list="ServiceContract" />
      </apex:tab>
      </apex:tabPanel>
</apex:page>

The related list exists on the page layout and all users have acces to it. Does anyone know the Child Relationship name for Service Contracts? Any assistance would be greatly apperciated, thank-you.

v/r
Shane
Hello Experts,

I am new to APEX coding and Visualforce Pages, but learning. I am having a bit of an issue with a VF page. I am trying to refrence either the record type ID or the record type name in an "IF" statement. Here is what I am trying to do, if the record type id equals a certain ID then show "Supplier Contract" else "Client Contract". I am of course running into an error. Here is the error and the coding:

Error: "Error: Unknown property 'ServiceContractStandardController.RecordType'"

Coding:
<apex:page standardController="ServiceContract" showHeader="true" 
        tabStyle="servicecontract" >
        <center>
        <apex:outputPanel style="background-color:red;width:100%;padding:20px;" 
    rendered="{!IF(RecordType.Id=='012K00000008w7q',h1,h2)}">
       <style>
h1 {
    font-size: 20px;
}
</style> 
        <h1>SUPPLIER ACCOUNT</h1>
        <style>
h2 {
    font-size: 20px;
}
</style>
        <h2>CLIENT CONTRACT</h2>
       </apex:outputPanel>
    </center>
        <style>
      .activeTab {background-color: #236FBD; color:white; 
         background-image:none}
      .inactiveTab { background-color: lightgrey; color:black; 
         background-image:none}
   </style>
   <apex:tabPanel switchType="client" selectedTab="tabdetails" 
                  id="ServiceAccountTabPanel" tabClass="activeTab" 
                  inactiveTabClass="inactiveTab">   
      <apex:tab label="Details" name="ServiceAcctDetails" id="tabdetails">
         <apex:detail relatedList="false" title="true"/>
      </apex:tab>
      <apex:tab label="Approval History" name="ApprovalHistory"
                 id="tabApprovalHist">
          <apex:relatedList subject="{!servicecontract}"
                          list="ProcessSteps" />
      </apex:tab>
            <apex:tab label="Notes and Attachments" name="NotesAndAttachments"
                 id="tabNotesAndAttachments">
          <apex:relatedList subject="{!servicecontract}"
                          list="CombinedAttachments" />
      </apex:tab>
            <apex:tab label="Field History" name="FieldHistory" 
                id="fieldhistory">
<apex:outputLink value="https://cs9.salesforce.com/_ui/common/history/ui/EntityHistoryFilterPage?id={!servicecontract.id}">
click to view field history
</apex:outputLink>
</apex:tab>
      </apex:tabPanel>
</apex:page>

Any Assistance would greatly apprecitated, thank-you. 

v/r
Shane
Hello Experts,

I am extremely new to the APEX Coding and to Visualforce Pages. I am trying to write, or find, an easy way to create a Red Banner, or Scrolling Marque, for my Account pages. Here is what I am trying to do or need:

If a field, Total_Elec_Gas_Avg_Usage__c, is greater or equal to 100,000, then I would like a Banner that states that the company is a "Key Account". You would think that this would be easy to code for. During my search the only thing that I have found is the following:

""the page will something like
<apex:page standardController="Account">
     <b>PUT YOUR TEXT HERE</b>
</apex:page>

and then use this visualforce page at the top of your Account's Page Layout."

Alas, this gives me an error. Now of course I did add it to my profile but still received an error. I would like to keep this as simple as possible. Now I could and am using an image formula for my list views, but I need something more prominent for my Account pages.

Any help would be greatly appreciated, thank-you.

Shane
Hi, I am very very new to APEX, but not new to Salesforce. I need to auto populate a picklist field on related obect from the parent object, due to the other picklist field is a controlling field for another multi-select picklist field. Here are the details: I would like to take the "BillingState" field from Accounts and use the value there to autopopluate a picklist field, "State__c" on Cases then pass the information to the field "Customer_State__c" on my custom object, Internal_Buy_Rate__c. I did find the following answer, https://developer.salesforce.com/forums/ForumsMain?id=906F000000093U9IAI, I am stuck on how to modify this to suit my purposes for the text field from accounts and than pass that information down to my related objects. Any help would be greatly appreciated. 

Thank-you.

Shane