• daveleland
  • NEWBIE
  • 0 Points
  • Member since 2013
  • IT Salesforce Manager
  • Kadant Inc.

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

I'm trying to write my first trigger and having difficulties doing it.  I was wondering if someone could help me.
On the account record there is a field called District__c.  This needs to be the same as Territory__c on the account owner's user record.  I would like the trigger to fire when the account owner is changed to keep the two fields in sync.  The trigger would need to work also when accounts are mass transferred from one owner to the other.
Thank you in advance for your help!
Claire

Hi,

In the setup section of a lightning enviornment $User.UITheme and $User.UIThemeDisplayed displays Theme3 whereas it should display Theme4d. Is this a bug? Is there a workaround for detecting the environment whether classic or lightning on setup pages? I have a visualforce page embedded in the user detail page and want to detect the environment from it. 

Thanks  
  • August 04, 2017
  • Like
  • 0

Salesforce1 has a great Today page which shows the users calendar mashed up with salesforce.com. It works well when the user is not using Salesforce as their primary calendar.  However many want to use Salesforce as the primary calendar.  So - How then do you display a calendar in Salesforce1?

 

This is a hack - but an easy one which works!  Here is how to add a Salesforce calendar to Salesforce1:

 

1) Create a visualforce page "My Calendar"  Be sure to make the page available for salesforce mobile apps.  The content of the page should be:

 

<apex:page showHeader="false" sidebar="false" >

<div style="overflow:scroll; width:100%; height:100%;">
    <object type="text/html" data="https://na2.salesforce.com/00U/c?isdtp=mn"
            style="overflow:scroll; width:1200px; height:2400px;">
    </object>
</div>

</apex:page>

 

2) Add a VisualForce tab for the visualforce page called my calendar.  Ensure the users can access the tab but make it hidden.  Does not need to be mobile ready as that setting is for the Classic Mobile app.

3) Under Mobile Administration / Moble Navigation add the "My Calendar" Visualforce tab to the selected Navigation menu item.

4) Login to Salesforce1 and celebrate your job well done!

 

I hope you find this as useful as I did.

 

 

 

I'm trying to write my first trigger and having difficulties doing it.  I was wondering if someone could help me.
On the account record there is a field called District__c.  This needs to be the same as Territory__c on the account owner's user record.  I would like the trigger to fire when the account owner is changed to keep the two fields in sync.  The trigger would need to work also when accounts are mass transferred from one owner to the other.
Thank you in advance for your help!
Claire