• kevin lam
  • SMARTIE
  • 1333 Points
  • Member since 2012

  • Chatter
    Feed
  • 43
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 261
    Replies
Hi All,
When I hover over the account on the case record the pop-up keeps loading in my organization...

Any suggestions would be of great help...!!!!

 
  • May 31, 2016
  • Like
  • 0
Hi All,

I created a validation rule On opportunity record type. When Opportunity Satge is closed and won picklist filed1 and picklist field2 must be populated. So that I created a validation rule like this:

AND(
     OR(ISPICKVAL( StageName , "Closed Won") ),  
     OR($RecordType.Name =  " Rec1 " ), 
     OR(ISPICKVAL(  Picklistfield1, ""  ),
        ISPICKVAL(  Picklistfield2 , "" ))
    )

It is not showing any errors. But it is not working. Can anyone have idea about this?

Thanks in Advance,
Pavithra.
I am attemping to insert a Queue into a Case Team (after insert) via apex. I have the logice to successfully insert a new Case Team Member, but continue to hit errors when attemting to swap the memberid for a Queue value.

My working member (user) code is as follows:
trigger CaseTeamMember_Owner_Insert on Case (after insert) {

    CaseTeamRole role = [select Name from CaseTeamRole where Name = 'Support Team' LIMIT 1];
    Map<Id, CaseTeamMember> membersToAdd = new Map<Id, CaseTeamMember>();
    List<Case> cases = [Select Id,OwnerId,ContactId,RecordTypeId,RecordType.Name
                  from Case where id IN :Trigger.newMap.keySet()];
    for (Case c : cases) {
    
      if (c.RecordType.Name == 'Support Case') {
           
        membersToAdd.put(c.Id, 
          new CaseTeamMember(                   
            TeamRoleId = role.Id,
            ParentId = c.Id,                        
            MemberId = c.OwnerId
          )
        );
        if (!membersToAdd.isEmpty()) {
          insert membersToAdd.values();
        }        
      }
    } 
}
My non-working member (queue) code is as follows:
trigger CaseTeamMember_Owner_Insert on Case (after insert) {

    CaseTeamRole role = [select Name from CaseTeamRole where Name = 'Support Team' LIMIT 1];
    Group g = [select Name from Group where Type = 'Queue' AND Name = 'Support Unassigned' LIMIT 1];
    Map<Id, CaseTeamMember> membersToAdd = new Map<Id, CaseTeamMember>();
    List<Case> cases = [Select Id,OwnerId,ContactId,RecordTypeId,RecordType.Name
                  from Case where id IN :Trigger.newMap.keySet()];
    for (Case c : cases) {
    
      if (c.RecordType.Name == 'Support Case') {
           
        membersToAdd.put(c.Id, 
          new CaseTeamMember(                   
            TeamRoleId = role.Id,
            ParentId = c.Id,                        
            MemberId = g.Id
          )
        );
        if (!membersToAdd.isEmpty()) {
          insert membersToAdd.values();
        }        
      }
    } 
}
The error that I am receiving when creating a new case with the member (queue) code in place:
 
Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger CaseTeamMember_Owner_Insert caused an unexpected exception, contact your administrator: CaseTeamMember_Owner_Insert: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Member ID: id value of incorrect type: 00G19000000ZNltEAG: [MemberId]: ()

Any thoughts?
 
Hello all,

I have had good luck with substituting a specific value in a null field in a provious email template with the following code:
{!Contact.FirstName}{!IF(ISBLANK(Contact.FirstName,""),Lead.FirstName)},


Now I'd like to substitute a default value *00 number in the null/blank field for Case Owner Phone. I tried this thinking iot would work much the same way as the above, but it does not retuurn the default 800#.
{!Case.OwnerPhone}{!IF(ISBLANK(Case.OwnerPhone,""),800-523-7918)}
Any thought on how to make this happen?

Thanks!
Hi all,

I need to update whoid on task and here is my simplified trigger which is not working.

trigger UpdateWhoID on Task (before insert, before update)
{
        for(Task t:Trigger.new)
        {
                t.whoid='003c000000csRby';    
        }
}

Note: Shared Activities is enabled in the organization.
  • August 03, 2015
  • Like
  • 0
Hello,
Is any one can help my issue it is urgent. I need to write validation rule.
I need to make multiple fields are mandatory Based on One multiselect picklist value by validation rule, is it possible?
I tried many ways as below, but doesn't solve my issue.
AND(INCLUDES( Sales_org__c, 'GB01'),
 ISBLANK(Customer_Group_1__c),
 ISBLANK(Channel__c)
)
.................

AND(INCLUDES( Sales_org__c, "GB01"),
     INCLUDES( Customer_Group_1__c, ""),
      INCLUDES( Channel__c, ""))
..................................

IF(INCLUDES(Sales_org__c, 'GB01'),INCLUDES(Sales_org__c, ''),FALSE)
..........................................

IF(ISPICKVAL(Sales_Unit__c, 'Bottles'),Quantity__c,
IF(ISPICKVAL(Sales_Unit__c, 'cases'), Quantity__c * Product__r.Bottles_per_Case__c,
IF(ISPICKVAL(Sales_Unit__c, 'each'),Quantity__c, null) )
.......................................................
NOT(INCLUDES( Sales_org__c, "GB01")&& INCLUDES( Customer_Group_1__c, "")&& INCLUDES( Channel__c, ""))
................................
AND(INCLUDES( Sales_org__c, "GB01"), NOT(AND(INCLUDES( Customer_Group_1__c, ""), INCLUDES( Channel__c, ""))))
 

Thanks in Advance
 
I'm working on a visualforce email template. I'm trying to display a textarea only if a certain checkbox is unchecked, but I keep getting the error: "Incorrect number of parameters for function 'IF()'. Expected 3, received 1"    

Here is my code:
<apex:outputText rendered="{!IF(cx.Activity_Completed__c == FALSE)}"><apex:param value="{!cx.Activity__c}" /></apex:outputText>
User could not edit any Task once it has been created by him & assigned to any other user
Hello, we have recently made change to our Opportunity stages and I was wondering is there is a way I can mass update filters in the Reports. What we want to do is mass update new stage values with the old one`s. I checked and this cant be done via data loader. Is there any other way ? Can I update stage values using metadata/with eclipse?

Hello,
   
I have a list like below which should be orderBy UserId but it is not as 
public List<ProfileSkillUser> tempResult{get;set;} 
public List<ProfileSkillUser> searchResult{get;set;} 

fucntion{
 for (5 times){
   tempResult = [SELECT UserId,  Name FROM ProfileSkillUser ORDER BY UserId];
   searchResult.addAll(tempResult);
 }
}
But the searchResult is not order by list, how can i achive it
 
I am trying to make a validation rule which stops users editing the email address of a contact or lead UNLESS the email field is blank.

I have tried the following both formulae to no avail:
Email <> "" && ISCHANGED(Email)
IF( Email <> "", ISCHANGED(Email), ISBLANK( Email ) )

The reason for this is that the Salesforce record is checked against a nother databse which uses email address as the unique identifier, so whenever the email address is changed in Salesforce, it creates a duplicate record (with the new email address) in the other database.

Any help is much appreciated!

 
I could not see Email Relay option in my Enterprise edition org. I am looking for relaying the email send such that the header reads coming from xyz.com (domain in sender email address i.e user@xyz.com) instead of salesforce.com. The reason why I am looking for this is that the client has setup a policy to consider such emails (i.e sender user@xyz.com coming from salesforce.com) as spoof and rejecting them. Please advise. Thanks
Is there an option to track the changes made to the Approval Process
I am practicing on trailhead via using my developer org. The chalenging asked me to Create a Guest Administrator and deactivate it. I am currenly the System Administrator of my developer org. We have only one license for System Administrator. How should we solve this issue in order to:
Create a new user using the System Administrator profile and then deactivate that user to preserve the licenses in your org.The new user must use the System Administrator Profile.
The username for the new user must include 'guestadmin' somewhere in it.
The new user must be inactive.
I need some hints or advices. Thanks.
Hello, 

I have a pageBlockTable that returns a list of records, but how can I sum the column values at the bottom?  Do I need to create an extension to my controller?  Or is there a way I can sum the values "on the fly"?

Here is my table: 
 
<apex:pageBlockTable value="{!listOfCO}" var="co">
            <apex:column value="{!co.Buyer_Name__c}"/>
            <apex:column value="{!co.Total_Order__c}"/>
            <apex:column value="{!co.Balance_to_Collect__c}"/>
            </apex:pageBlockTable>

I would really appreciate any help!

Thanks, 

John

 
is there a way in visualforce to get and set record from two different objects without using an apex class? The standard controller is the parent in the master-detail relationship
  • March 16, 2015
  • Like
  • 0
public with sharing class Controller1{

    public String temp1 {get;set;}
    public String temp2 {get;set;}

    public void test() {
        //temp1 ='someValue' and temp2='SomeValu1'
	if(temp1 != '' && temp1 != null && temp2 != '' && temp2 != null){

		//Manipulation
	}
    }

}
I had above piece of code, which checked if condition properly, but when i moved code to Sandbox, the if condition always fails.

Any suggestions and reason for cause, if known ?
  • March 15, 2015
  • Like
  • 0
Hi,
       trigger Trg_onContact on Contact (before insert, before update) {

List<ID> accountIds=new List<ID>();

for(Contact con:Trigger.New)
{
  if(con.Email != null && con.AccountId !=null)
  {
   accountIds.add(con.AccountId);
  }
}
List<Contact> contactList=[SELECT Email FROM Contact WHERE Id IN : accountIds];
List<Account> accountList=[SELECT Name,Email__C FROM Account WHERE Id IN :accountIds];

for(Integer i=0; i < accountList.size(); i++)
{
  String Email = ''+ contactList[0].get('Email');
  accountList[i].Email__C=Email;
 
}

update accountlist;

System.debug('***accountlist****'+accountlist);

}

please help me...........
  • September 29, 2014
  • Like
  • 0
Hi, I'm creating a VF page like I've done about a dozen times and getting an error that should be easy to fix but somehow evades me.  

Error Error: ServQ_Inquiry line 13, column 30: Open quote is expected for attribute "title" associated with an element type "apex:pageblocksection" 
Error Error: Open quote is expected for attribute "title" associated with an element type "apex:pageblocksection".

From the beginning of the page to the line in which it has the error looks like this:

<apex:page controller="ServQInquiry" tabStyle="ServQ__c" showHeader="true" sidebar="false" >
    <apex:form >
        <apex:pageBlocksection title="Search by Customer">
                 <apex:inputText value="{!ServQ_Inquiry}" label="Inquiry"/>
            </apex:pageBlockSection>
<apex:pageblocksection title="Search by Something" showheader="false" columns="2">
                 <apex:inputText value="{!ServQ_Customer_Number}" label="Customer Number"/>
                 <apex:inputText value="{!ServQ_Customer_Name}" label="Customer Name"/>
                 <apex:inputText value="{!ServQ_Ship_to_Number}" label="Ship To Number"/>
                 <apex:inputText value="{!ServQ_Ship_To_Name}" label="Ship To Name"/>
        </apex:pageblocksection>
As you can see the " is right where it should be, yet it won't stop kicking that error.  

Any ideas?

Hello,

I created the class below to fire from a trigger on the Update of a custom object.  The code is designed to update 2 fields on an associated Account with values from the associated custom object.  The Account_Manager_Handoff_Notes__c field updates fine.  However, the Secondary_Owner__c field does not update at all.  Can anyone help me decifer why that field is not updating?  Thanks,

public void addNotes(List<Account_Manager_Handoff__c> accountManagerHandoffs){
        
        Set<Id> accountsInTrigger = new Set<Id>();
        Map<String,String> accountMap = new Map<String,String>();
        List<Account> accountsToUpdate = new List<Account>();
        
        FOR(Account_Manager_Handoff__c amh : accountManagerHandoffs){
            IF(amh.AccountLookup__c != NULL){
            
            accountsInTrigger.add(amh.AccountLookup__c);
            String notes = amh.Platform_Experience__c + '\n\n' + amh.Issues_Encountered__c + '\n\n' + amh.Known_Goals__c + '\n\n' + amh.Additional_Notes__c;
            String owner = amh.Assigned_Account_Manager__c;
            accountMap.put(amh.AccountLookup__c,notes);
            accountMap.put(amh.AccountLookup__c,owner);
                
            }
        }
        
        FOR(Account a : [SELECT
                            Id,Account_Manager_Handoff_Notes__c,OwnerId
                         FROM
                            Account
                         WHERE
                            Id In :accountsInTrigger]){
                             
                             a.Account_Manager_Handoff_Notes__c = accountMap.get(a.Id);
                             a.Secondary_Owner__c = accountMap.get(a.Id);
                             accountsToUpdate.add(a);
                             
                         }
        
        UPDATE accountsToUpdate;
        
    }


Hi,

I'm trying to incorporate an If-Then statement into my visualforce section. For instance, if Field X = true, display these values, otherwise display nothing. 

What's the syntax for including an If-Then statement in my visualforce?
Hi,

I am working on the JavaScript code using MyInsight library. I want to display all the available Record Types for the ‘Call' object.

I tried querying for the 'RecordTypeID' from the 'Call' object using runQuery() method. I did not get all the available Record Types, but only got those Record Types for which Calls were recorded. 

Please let me know how I can get all the available Record Type values.

Also, can you please provide me the object name through which I can get the Record type name from the RecordTypeID. I tried using RecordType object, but its not present in the object list.

Thanks in advance,
Anuja
Hi Expert,

I have a two object "Account" and "Project". both have a picklist. When i add new option in "Account" object picklist the "Project"  object picklist auto upate by "Account" object picklist. For Example 

Object(Account)                    Object(Project)

Picklist(State)                       Picklist(State)
                                          
option A, B ,C                       option A,B,C

Means when i delete 'A' from  project object picklist then  Account Object will have only "B, C" now "A" will delete, Same apply if i delete Account object picklist.

Please suggest about any process.

Thanksa
Mukesh 



 
I was trying to link my users to a salesforce edit screen using the new layout where a user can input data. 
This link I pulled doesn't work..

https://na60.salesforce.com/00U/e?who_id=0013000000etHLG&what_id=006a000001OwOTE&retURL=%2F006a000001OwOTE&RecordType=0120c000001NfRl&ent=Event

I believe I need the record type specified but What is the structure that I need to use for my link?  Do I need the who_id and the whatid?
 
I used the following to restrict visibility of the account detail page from non-owners:

<apex:page standardController="Account">
    <apex:detail rendered="{!$User.Id=Account.OwnerId}"/>
     
    <apex:pageblock title="Detail" rendered="{!$User.Id<>Account.OwnerId}">
        <apex:pageBlockSection collapsible="false" >
            <apex:outputField value="{!Account.Name}"/>
            <apex:outputfield value="{!Account.OwnerId}"/>
            <apex:outputfield value="{!Account.Active_Account__c}"/>
         </apex:pageBlockSection>
    </apex:pageblock>
 
</apex:page>

This worked, but also restricted the view of System Admins. I tried adding: <apex:detail rendered="{!$User.Profile=System Administrator}"> and many other versions, but the system does not recognize User.Profile as a field.

Help! What am I doing wrong and how can I make sure that System Admins are not affected by the visibility restriction?
Hi All,
When I hover over the account on the case record the pop-up keeps loading in my organization...

Any suggestions would be of great help...!!!!

 
  • May 31, 2016
  • Like
  • 0
Hi All,

I created a validation rule On opportunity record type. When Opportunity Satge is closed and won picklist filed1 and picklist field2 must be populated. So that I created a validation rule like this:

AND(
     OR(ISPICKVAL( StageName , "Closed Won") ),  
     OR($RecordType.Name =  " Rec1 " ), 
     OR(ISPICKVAL(  Picklistfield1, ""  ),
        ISPICKVAL(  Picklistfield2 , "" ))
    )

It is not showing any errors. But it is not working. Can anyone have idea about this?

Thanks in Advance,
Pavithra.
I created a simple visualforce page and inserted it into in a custom account page layout.
<apex:page standardController="Account" >
<body>
<table width="100%" border="0" cellspacing="5" cellpadding="5">
  <tbody>
    <tr>
      <td align="center">
         
                  <iframe frameborder="0" height="100" marginheight="0" marginwidth="0" align="center"            
                        src="https://www.google.com/uds/modules/elements/newsshow/iframe.html?q=%22{!Account.name}%22{!Account.Acronym__c}%22&amp;#38;rsz=small&amp;#38;format=728x180" width="728">
              </iframe>
            
    </td>
    </tr>
    <tr>
      <td>
      <table width="100%" border="0" cellspacing="5" cellpadding="5">
  <tbody>
    <tr>
      <td width="16%" align="center" valign="middle"  scope="col">&nbsp;</td>
      <td width="16%" align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="col"><p>Magellan</p></td>
      <td width="16%" align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="col">BH</td>
      <td width="16%" align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="col">NIA </td>
      <td width="16%" align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="col">RX</td>
      <td width="16%" align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="col">Employer</td>
    </tr>
    <tr>
      <td align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="row">Customer</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.var_Magellan_Customer__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.var_Customer_BH__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.var_Customer_NIA__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD">&nbsp;</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.var_Customer_Emp__c}" /></td>
    </tr>
    <tr>
      <td align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="row">Original Effective Date</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_OED_Mag__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_OED_BH__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_OED_NIA__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD">&nbsp;</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_OED_EMP__c}" /></td>

    </tr>
    <tr>
      <td align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="row">Current Effective Date</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CED_Mag__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CED_BH__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CED_NIA__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD">&nbsp;</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CED_Emp__c}" /></td>
    </tr>
    <tr>
      <td align="center" valign="middle" bgcolor="#0077C8" style="color: #FFFFFF" scope="row">Current Contract End date</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CCED_Mag__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CCED_BH__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CCED_NIA__c}" /></td>
      <td align="center" valign="middle" bgcolor="#DDDDDD">&nbsp;</td>
      <td align="center" valign="middle" bgcolor="#DDDDDD"><apex:outputField value="{!Account.rs_CCED_Emp__c}" /></td>
    </tr>
  </tbody>
</table>
      </td>
    </tr>
  </tbody>
</table>
<p>
<em>&nbsp;* The above information is based on the infomation provided below in the Magellan Contracts section. This data is still in the early stages of data collection.</em>
</p>
<hr/>
</body>
</apex:page>

I then enabled the visualforce page for all profiles and assigned all profiles the account page layout.  All profiles see the visualforce page when they click on an account, but only system admins get results for the iframe component:
<iframe frameborder="0" height="100" marginheight="0" marginwidth="0" align="center"            
                        src="https://www.google.com/uds/modules/elements/newsshow/iframe.html?q=%22{!Account.name}%22{!Account.Acronym__c}%22&amp;#38;rsz=small&amp;#38;format=728x180" width="728">
              </iframe>

If there something I need to enable on all the other profiles to allow them to see the Google News iframe?

Thanks,
Todd B.

 
Hello.  I am creating a delegated admin group to manage user creationg.  When they try to re-set a user password they are getting insufficient privlidge error.  Is there a way to give this priv?
I am attemping to insert a Queue into a Case Team (after insert) via apex. I have the logice to successfully insert a new Case Team Member, but continue to hit errors when attemting to swap the memberid for a Queue value.

My working member (user) code is as follows:
trigger CaseTeamMember_Owner_Insert on Case (after insert) {

    CaseTeamRole role = [select Name from CaseTeamRole where Name = 'Support Team' LIMIT 1];
    Map<Id, CaseTeamMember> membersToAdd = new Map<Id, CaseTeamMember>();
    List<Case> cases = [Select Id,OwnerId,ContactId,RecordTypeId,RecordType.Name
                  from Case where id IN :Trigger.newMap.keySet()];
    for (Case c : cases) {
    
      if (c.RecordType.Name == 'Support Case') {
           
        membersToAdd.put(c.Id, 
          new CaseTeamMember(                   
            TeamRoleId = role.Id,
            ParentId = c.Id,                        
            MemberId = c.OwnerId
          )
        );
        if (!membersToAdd.isEmpty()) {
          insert membersToAdd.values();
        }        
      }
    } 
}
My non-working member (queue) code is as follows:
trigger CaseTeamMember_Owner_Insert on Case (after insert) {

    CaseTeamRole role = [select Name from CaseTeamRole where Name = 'Support Team' LIMIT 1];
    Group g = [select Name from Group where Type = 'Queue' AND Name = 'Support Unassigned' LIMIT 1];
    Map<Id, CaseTeamMember> membersToAdd = new Map<Id, CaseTeamMember>();
    List<Case> cases = [Select Id,OwnerId,ContactId,RecordTypeId,RecordType.Name
                  from Case where id IN :Trigger.newMap.keySet()];
    for (Case c : cases) {
    
      if (c.RecordType.Name == 'Support Case') {
           
        membersToAdd.put(c.Id, 
          new CaseTeamMember(                   
            TeamRoleId = role.Id,
            ParentId = c.Id,                        
            MemberId = g.Id
          )
        );
        if (!membersToAdd.isEmpty()) {
          insert membersToAdd.values();
        }        
      }
    } 
}
The error that I am receiving when creating a new case with the member (queue) code in place:
 
Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger CaseTeamMember_Owner_Insert caused an unexpected exception, contact your administrator: CaseTeamMember_Owner_Insert: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Member ID: id value of incorrect type: 00G19000000ZNltEAG: [MemberId]: ()

Any thoughts?
 
Hi All-

I am trying to override the New Case button on accounts when account Billing Status = Cancelled. This is what I have so far, but I'd love some input. When I click the New Case button, instead of generating my VF error page, it asks me to select a record type, and when I do, it just goes back to the record type selection page. In theory I shouldn't even be getting to the record type selection when the criteria is met, but should just be sent to the VF error page I created. I have to use the Case standardController to override the New Case button, but I wonder if that's my issue since I'm trying to prevent an action from happening when there's no case to reference. Thanks!
 
<apex:page standardController="Case"
action="
  {!
  IF(case.Account.Billing_Status__c == 'Cancelled', 
       URLFOR($Page.CasePageMessenger, case.id,[id=case.id],FALSE),
       URLFOR($Action.Case.NewCase, case.id,[retURL="/001"], TRUE)
    )
  }">
<apex:pageMessage severity="ERROR" 
    strength="3" 
    title="Case Create" 
    summary="This Account is cancelled and can not receive support.">
</apex:pageMessage>
</apex:page>

 
Hello,
I can do the following with apex code but I wanted to inquire if there was a way to do it without using formula creators.  I am working on a pair of custom objects (a parent and a child) and I want to apply a sequence field to control the order in which the child object's records would appear in when their parent record was selected.  Creating the field was easy but making it user friendly to create new child records for the parent has proven difficult. 

When a new record is created I originally wanted the sequence field to be default populated by a number that was the highest in the sequence of the parent record's child lots (i.e. if child record sequences 2, 4, and 6 already existed I wanted to the default value to be something like '=MAX(Parent__r.Children__r.Sequence__c) + 2' to and b populated by an 8... and yes I realize that the function syntax I just gave is bogus) .

Not able to find good documentation online for if this was possible to assign as a default value I turned to the Process Builder to have it assigned when a new child record was created via a workflow if the child sequence field was left blank during its creation.  However, once again I could not find good documentation to rule out whether or not I could do this without an Apex Class as I muddled through the process. When I search for Max or Maximum I tend to get posts about the governing limits.

Does anyone know if this might be possible in the formula creator without writing Apex code?  Thanks in advance.

Anthony
Hello, 

Is it possible to pass a variable from a hyperlink into a visualforce page? 

For example, if I have a visualforce page with three links to anothe page: 

Red
Green
Blue

Can I have all three of those links point to the same vf page, but the page will render differently depending on which link was clicked? 

So that clicking on the "Red" link would allow me to use an argument like this: 
 
<apex:repeat value="{!listOfObjects}" var="object>
<apex:outputPanel rendered="{!IF(object.Custom_Field_With_Field_Value_Of_Red__c = Variable_Passed_in_by_URL, true, false)}">

Is this remotely possible at all? 

If so how would I do this?  
 
I am querying some fields from an object and saving this into a list. Now I want use one of the field in IF condition, but I am receiving error " Initial term of field expression must be a concrete SObject" at IF condition line.
Please help me with these guys. 
Thanks in advance. :)
Cid = ApexPages.CurrentPage().getparameters().get('id');
list<Client_Intake_Forms__c> conCount = new list<Client_Intake_Forms__c>();
     conCount=[select id,name,Completed__c from Client_Intake_Forms__c where Client__c =:Cid ];
    System.debug('conCount>>>>>>>>>>'+conCount);
	if(conCount.Completed__c == true ){
		ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'This client has a finished intake form. A new intake form cannot be started.'));
		
		System.debug('In error condition');
		
	}

 
Hi All, 

I am trying to display the address of a contact on a visualforce page. I am trying to reference the field 'Mailing Address' so that I would get that little google maps snapshot, like we do on the standard Contact detail page

User-added image
But I am getting an error 

Unsupported type: common.api.soap.wsdl.Address used in expression: Contact.MailingAddress

I have leanrt from some forums that the Mailing address is a compounded field and hence cannot be referenced . Is there a way I can mimic this Mailing Address and display that little google snapshot ? 


Any help is appreciated. 


Thanks
Nitish