• J80
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 8
    Replies
Hi Folks
I need to switch user licenses from a very old SF org to a brand new org just before going live (overnight).
Does anyone have any experience with this? SFDC have said that this is not something they can help with.
Any tips greatly appreciated. Thanks.
  • March 04, 2015
  • Like
  • 0
Any Idea what is going wrong here?

Error
  • February 20, 2015
  • Like
  • 0
Any ideas? Its driving me mad!

Trigger
  • February 20, 2015
  • Like
  • 0
Hi Folks
Huge Huge favour to ask. Im strugglin with a trigger and just wanted to see if you could help perfect it?

It should be everytime a Contact is updated or inserted you check the DRM Active flag. 
If its true you assign the DRM Contact Employer as the Primary Account.
The Primary account will be whatever Account the DRM Contact Employer is. 

Ive tried this Is this anywhere close?

trigger PrimaryAccount on Account (before update, before insert) { 
//Set of Account Ids 
 for(Account fcon : Trigger.New)
 {
    if(fcon.DRM_Active_c != TRUE)
        fcon.DRM_Contact_employer = fcon.ParentId;
 }


Other criteria is:
Ensure this field isn't visible to standard users
Ensure this field is wiped if their employment history is deleted or if all records are set to inactive.

Any help would be Greatly appreciated. 

Cheers!
  • February 19, 2015
  • Like
  • 0
Hi Folks
I know tihs is a big ask but is anyone able to translate this for me?

Trigger TKR_UserStoryTrigger on TKR_User_Story__c(before insert, before update, after update) {
    if (trigger.isBefore && trigger.isInsert) {
        TKR_UserStoryTriggerClass.populateAppStakeholders(trigger.new);
    }
    if (trigger.isAfter && trigger.isUpdate) {
        //custom AC history
        Map < Id, String > mapStoryAC = new Map < Id, String > ();
        Map < Id, String > mapStoryCC = new Map < Id, String > ();
        Map < Id, TKR_User_Story__c > mapStoryInsertFields = new Map < Id, TKR_User_Story__c > ();
        Map < Id, TKR_User_Story__c > mapStoryUpdateFields = new Map < Id, TKR_User_Story__c > ();
        Map < Id, TKR_User_Story__c > mapTimeStampFields = new Map < Id, TKR_User_Story__c > ();
        for (TKR_User_Story__c thisUS: trigger.new) {
            if (thisUS.Acceptance_Criteria__c != trigger.oldMap.get(thisUS.id).Acceptance_Criteria__c) {
                mapStoryAC.put(thisUS.id, trigger.oldMap.get(thisUS.id).Acceptance_Criteria__c);
            }
            if (thisUS.Compliance_Criteria__c != trigger.oldMap.get(thisUS.id).Compliance_Criteria__c) {
                mapStoryCC.put(thisUS.id, trigger.oldMap.get(thisUS.id).Compliance_Criteria__c);
            }
            if ((trigger.oldMap.get(thisUS.id).Approval_Status__c != 'Pending Approval' && thisUS.Approval_Status__c == 'Pending Approval')) {
                mapStoryInsertFields.put(thisUS.id, thisUS);
            }
            if ((thisUS.Approval_Status__c != trigger.oldMap.get(thisUS.id).Approval_Status__c && trigger.oldMap.get(thisUS.id).Approval_Status__c == 'Pending Approval' && (thisUS.Approval_Status__c == 'Approved' || thisUS.Approval_Status__c == 'Rejected'))) {
                mapStoryUpdateFields.put(thisUS.id, thisUS);
            }
        }
        if (!mapStoryInsertFields.isEmpty()) {
            TKR_UserStoryTriggerClass.createNewApprovalHistoryRecord(mapStoryInsertFields);
        }
        TKR_UserStoryTriggerClass.createNewACHistoryRecord(mapStoryAC, mapStoryCC);
        //autoburndown
        Set < Id > affectedSprints = new Set < Id > ();
        for (TKR_User_Story__c us: trigger.new) {
            affectedSprints.add(us.Allocated_Sprint__c);
        }
        for (Id sprint: affectedSprints) {
            TKR_automateBurnDown.updateSprintBurndown(sprint);
        }
    }
}
 

 
  • February 18, 2015
  • Like
  • 0
Hi Folks
I require code for the following scenario.I have a custom object called Employment history.I need to:
Build a trigger which shoews the latests employment record  (latest active employment record = 'Contact_Employer' with a checkbox which says 'Active') and adds this value to the parent account field
Ensure this field isn't visible to standard users
Ensure this field is wiped if their employment history is deleted or if all records are set to inactive.

Any ideas?

Many thanks 
  • February 16, 2015
  • Like
  • 0
Hi Folks
I require code for the following scenario.I have a custom object called Employment history. I need to:
Build a  trigger which identifies the primary account (likely to be the latest active employment record) and adds this value to the parent account field
Ensure this field isn't visible to standard users
Ensure this field is wiped if their employment history is deleted or if all records are set to inactive.

Any ideas?

Many thanks 
  • February 16, 2015
  • Like
  • 0
Hi Folks
I need have a trigger to show the parent account on the contact page.This field is populated automatically with the primary account.
Any ideas?
  • February 13, 2015
  • Like
  • 0
Any ideas? Its driving me mad!

Trigger
  • February 20, 2015
  • Like
  • 0
Hi Folks
Huge Huge favour to ask. Im strugglin with a trigger and just wanted to see if you could help perfect it?

It should be everytime a Contact is updated or inserted you check the DRM Active flag. 
If its true you assign the DRM Contact Employer as the Primary Account.
The Primary account will be whatever Account the DRM Contact Employer is. 

Ive tried this Is this anywhere close?

trigger PrimaryAccount on Account (before update, before insert) { 
//Set of Account Ids 
 for(Account fcon : Trigger.New)
 {
    if(fcon.DRM_Active_c != TRUE)
        fcon.DRM_Contact_employer = fcon.ParentId;
 }


Other criteria is:
Ensure this field isn't visible to standard users
Ensure this field is wiped if their employment history is deleted or if all records are set to inactive.

Any help would be Greatly appreciated. 

Cheers!
  • February 19, 2015
  • Like
  • 0
Hi Folks
I require code for the following scenario.I have a custom object called Employment history.I need to:
Build a trigger which shoews the latests employment record  (latest active employment record = 'Contact_Employer' with a checkbox which says 'Active') and adds this value to the parent account field
Ensure this field isn't visible to standard users
Ensure this field is wiped if their employment history is deleted or if all records are set to inactive.

Any ideas?

Many thanks 
  • February 16, 2015
  • Like
  • 0
Hi Folks
I require code for the following scenario.I have a custom object called Employment history. I need to:
Build a  trigger which identifies the primary account (likely to be the latest active employment record) and adds this value to the parent account field
Ensure this field isn't visible to standard users
Ensure this field is wiped if their employment history is deleted or if all records are set to inactive.

Any ideas?

Many thanks 
  • February 16, 2015
  • Like
  • 0