• SteveMou
  • NEWBIE
  • 35 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 5
    Replies
Curious what the best approach is to replace custom buttons that are currently using OnClick Javascript or URL since they are no longer supported when switching to Lightning Experience. Is it best to replace the classic buttons by building a new buton using the Lightning Design System framework within Lightning components and then adding to the page layout?
I currently have access to a Lightning Experience preview org and was taking a look at the Non-Lightning related enhancements to Visual Workflow regarding picklists now being available as a resource for a picklist Choice field. I have encountered two issues I was wondering if anyone had any feedback on.

1) Even though you can now select a picklist as a resource in a flow I am not able to select a default value for it like I can with other resource types. This causes a problem if you want the field in the flow to retain a value if a user re-enters the flow again at a later time to review their choices.  

2) You can save your flow with no issues if you are switched to Lightning experience, however when you click to re-open the flow and edit nothing shows in the Flow window, no screens, etc. I actually had to switch back to Classic in order to see everything. I tried with Chrome and Firefox.
I just created an Apex Class in my Sandbox Org that is running on the Summer 2014 preview. The code works fine, but when I deploy the changeset to Production I get the below error:

"This change set contains components that require 31.0 or higher platform version. Please select an Organization with a platform version of 31.0 of higher".


Is there a way around this or do I need to wait until July 18th when SFDC Production is updated with Summer 2014? 
All I am trying to write an Apex Trigger that will take a text formula field (Bus_Seg) on a Child Object (Account_Team_Assignment__c) and concatenate the values into a custom long text field (AccountTeamBusSeg__c) on the Parent object (Account). 

The Account_Team_Assignment__c object is tied to the Account object by a lookup field called Account_Name__c.  The field Account_Name__c stores the 18 digit Account ID on each Account Team Assignment record created.

Can anyone help me understand why what I have below is not working properly? I keep getting an error stating "Didn't understand relationship 'Account_Team_Assignment__r".



trigger trgConCatBusSeg on Account_Team_Assignment__c (after insert, after update, after delete, after undelete) {

//If the event is insert or undelete, this list takes New Values or else it takes old values
List<Account_Team_Assignment__c> AccountTeamList = (Trigger.isInsert|| Trigger.isUnDelete) ? Trigger.new : Trigger.old;

//Stores the Account Team assignment object's Account ID that is associated with each child record
List<Account_Name__c> AccountTeamIds = new List<Account_Name__c>();

//Loop through the Account Team Assignment object Records to store the Accountteam Id values
for (Account_Team_Assignment__c Acc_team : AccountTeamList) {
AccountteamIds.add(Acc_team.Account);
}

//Sub-query to get the Account and all its Child Records where Account's Id is equal to the Ids stored in AccountTeamIds
//Account_Team_Assignment__c is the Child Relationship name appended by '__r' as it is a custom object

List<Account> AccountList = [
select
id,
(select Account_Name__c, BUS_SEG__c from Account_Team_Assignment__r)
from
Account
where
id in :AccountTeamIds];

//Loop through the List and store the Child Records as a String of values in Long Text Area Field called AccountTeamBusSeg__c

for (Account Acct : AccountList) {

if(Acct.Account_Team_Assignment__r.size() > 0)
{
Acct.AccountTeamBusSeg__c = string.valueOf(Acct.Account_Team_Assignment__r[0].BUS_SEG__c);

for(integer i=1;i < Acct.Account_Team_Assignment__r.size();i++)
{
Acct.AccountTeamBusSeg__c = Acct.AccountTeamBusSeg__c + '; ' + string.valueOf(Acct.Account_Team_Assignment__r[i].BUS_SEG__c);
}
}
else
Acct.AccountTeamBusSeg__c = null;

}

//update the List
update AccountList;


}

Does anyone know if it is possible on a single VF page to require a field ( Required="True") for only a specifc User Profile instead of just for all profiles?  I have an Opportunity VF page where I only want a certain group of users based on their Profile to have the field as required.

 

My only option I see at the moment is creating separate VF pages and then assigning them to specific profiles.

Does anyone have a simple Visualforce page that I can use instead of the standard Opportunity Home page? I want it to look just like the standard Opportunity home page with the Recent Opportunities section and the ability to create views.

 

The reason I am wanting to override the Standard Opportunities tab and replace the existing Opportunities home page is so that I can add several custom detail buttons to the page.

Can anyone provide me with advice on how to change my Apex Trigger below to not have the SOQL query within my for loop? I am getting the "Too many SOQL queries" error.

 

trigger AccountTeamDuplicateTrigger on Account_Team_Assignment__c (before insert,before update) {
  for (Account_Team_Assignment__c c : Trigger.new){

   Account_Team_Assignment__c[] Account_Team_Assignments= [select Account_Name__c from Account_Team_Assignment__c Where Active__c = TRUE and Business_Segments__c = :c.Business_Segments__c and Account_Name__c = :c.Account_Name__c ];
   
   if (Account_Team_Assignments.size() > 1) {
     c.Representative__c.addError('BDRep cannot be created - An active BD already exists in the Account Team for this Business Segment');
  }     
 }
}

All,

 

I am looking to create an Apex Trigger that will look for a duplicates, but instead of the Trigger looking for the duplicate in the entire object I want it to only look at the specific Account the Account Team record is being created against.

 

I currently have the below code, however it is checking against the entire Account_Team_Assignment__c object instead of just the Account ID the Account Team record is being created for. Any ideas on how to limit the code I have below to only look at the specific Account record the Account Team Assignment is being created on for the duplicate?

 

(The code looks to make sure the Assignment is Active, and then it is checking to make sure a record with the same Business segment does not already exist)

 

 

trigger AccountTeamDuplicateTrigger on Account_Team_Assignment__c (before insert,before update) { 
  for (Account_Team_Assignment__c c : Trigger.new){

   Account_Team_Assignment__c[] Account_Team_Assignments= [select id from Account_Team_Assignment__c Where Active__c = TRUE and Business_Segments__c = :c.Business_Segments__c LIMIT 1 ];
    
   if (Account_Team_Assignments.size() > 0) { 
     c.Representative__c.addError('BDRep cannot be created - An active BD already exists in the Account Team for this Business Segment');
  }      
 }
}

I realize now that Workflows can not update fields that reside on two separate objects (Hopefully in 2012 this will happen according to Dreamforce Roadmap).

 

In the meantime could someone help get me started on how to create an Apex Trigger that would accomplish this? Here is what I am attempting to do.

 

If a user has added a Salesmember to the Opportunity_Sales_Team Custom object with a Type of Account Development then I want it to take the SalesTeamMemberName and display it in the Team field I have added to the Opportunity Standard object

 

Standard Object -Opportunity

Standard Object Field-Team

 

Custom Object- Opportunity_Sales_Team

Custom Object Fields- SalesMemberName and Type

 

Thanks so much in advance for any help or advise.

 

 

I have a custom formula field on the Opportunity Object called "Global_Total_Direct__C". This field is a custom currency formula field that looks at 2 other custom Roll-up Summary fields and puts 1 of the 2 values in it based on criteria.

 

The issue is I can not reference Formula fields in a new plugin I am using in Salesforce.com so I am trying to get the value from "Global_Total_Direct__C" populated into a new Custom Currency field I created called "Total Value".

 

I tried Workflow rules & Field Updates and it did not work. I am thinking maybe an Apex Trigger but I have no clue on how to write Apex code.

 

Any help is appreciated.

 

Thanks.

 

 

Does anyone know if it is possible to completely hide a specific Panel on Visual force Pages?

 

For example I have a Panel on the Account screen that I only want to display if it is the Parent Account record. We store our Accounts by location so we might have 50 different Accounts called "ABC", but only 1 of them is the Parent Headquarters location.

 

I have a custom field called "Primary Account" that indicates whether the Account is the Parent or not. How can I then only show this specific panel on the screen if it is the Parent Account location?

SFDC pushed out a patch over a weekend back in August that affected a Dynamic Picklist field we have on our Opportunity page (Visualforce).  The issue is that the field no longer functions in IE7 (it shows no values in the picklist), but it still works fine in Mozilla and IE8. For some reason we now have to select "Edit Read-Only" fields on all profiles in order for it to work in IE7. This then breaks the field level security we had in place on each of the Account, Contact, and Opp screens.

Any thoughts? Is anyone else experiencing this issue? SFDC basic support's solution was start using IE8, but our company is not rolling that out until 2012 and we have 500 users stuck with IE7.

Thanks.



Does anyone have any ideas on how to create a field on the Contact page that would be some sort of Gauge ranking a contact as Hot, Warm, Cold based on how recent the last Activity History record was?

 

For example if a contact has Activity History in the past 30 days the field or gauge would say "Hot".

 

Would an Apex Trigger accomplish this?

 

Any thoughts or help is greatly appreciated.

 

Thanks!!

Curious what the best approach is to replace custom buttons that are currently using OnClick Javascript or URL since they are no longer supported when switching to Lightning Experience. Is it best to replace the classic buttons by building a new buton using the Lightning Design System framework within Lightning components and then adding to the page layout?
I just created an Apex Class in my Sandbox Org that is running on the Summer 2014 preview. The code works fine, but when I deploy the changeset to Production I get the below error:

"This change set contains components that require 31.0 or higher platform version. Please select an Organization with a platform version of 31.0 of higher".


Is there a way around this or do I need to wait until July 18th when SFDC Production is updated with Summer 2014? 
All I am trying to write an Apex Trigger that will take a text formula field (Bus_Seg) on a Child Object (Account_Team_Assignment__c) and concatenate the values into a custom long text field (AccountTeamBusSeg__c) on the Parent object (Account). 

The Account_Team_Assignment__c object is tied to the Account object by a lookup field called Account_Name__c.  The field Account_Name__c stores the 18 digit Account ID on each Account Team Assignment record created.

Can anyone help me understand why what I have below is not working properly? I keep getting an error stating "Didn't understand relationship 'Account_Team_Assignment__r".



trigger trgConCatBusSeg on Account_Team_Assignment__c (after insert, after update, after delete, after undelete) {

//If the event is insert or undelete, this list takes New Values or else it takes old values
List<Account_Team_Assignment__c> AccountTeamList = (Trigger.isInsert|| Trigger.isUnDelete) ? Trigger.new : Trigger.old;

//Stores the Account Team assignment object's Account ID that is associated with each child record
List<Account_Name__c> AccountTeamIds = new List<Account_Name__c>();

//Loop through the Account Team Assignment object Records to store the Accountteam Id values
for (Account_Team_Assignment__c Acc_team : AccountTeamList) {
AccountteamIds.add(Acc_team.Account);
}

//Sub-query to get the Account and all its Child Records where Account's Id is equal to the Ids stored in AccountTeamIds
//Account_Team_Assignment__c is the Child Relationship name appended by '__r' as it is a custom object

List<Account> AccountList = [
select
id,
(select Account_Name__c, BUS_SEG__c from Account_Team_Assignment__r)
from
Account
where
id in :AccountTeamIds];

//Loop through the List and store the Child Records as a String of values in Long Text Area Field called AccountTeamBusSeg__c

for (Account Acct : AccountList) {

if(Acct.Account_Team_Assignment__r.size() > 0)
{
Acct.AccountTeamBusSeg__c = string.valueOf(Acct.Account_Team_Assignment__r[0].BUS_SEG__c);

for(integer i=1;i < Acct.Account_Team_Assignment__r.size();i++)
{
Acct.AccountTeamBusSeg__c = Acct.AccountTeamBusSeg__c + '; ' + string.valueOf(Acct.Account_Team_Assignment__r[i].BUS_SEG__c);
}
}
else
Acct.AccountTeamBusSeg__c = null;

}

//update the List
update AccountList;


}

Does anyone know if it is possible on a single VF page to require a field ( Required="True") for only a specifc User Profile instead of just for all profiles?  I have an Opportunity VF page where I only want a certain group of users based on their Profile to have the field as required.

 

My only option I see at the moment is creating separate VF pages and then assigning them to specific profiles.

Does anyone have any ideas on how to create a field on the Contact page that would be some sort of Gauge ranking a contact as Hot, Warm, Cold based on how recent the last Activity History record was?

 

For example if a contact has Activity History in the past 30 days the field or gauge would say "Hot".

 

Would an Apex Trigger accomplish this?

 

Any thoughts or help is greatly appreciated.

 

Thanks!!