• EricLehnen
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hello everyone,

I tried creating workflow rules to meet my needs. However, the WFR will only fire when the account record is updated and I need a trigger to evaluate realtime. Unfortunately, I do not understand Apex, but I am starting to learn.

What I am trying to accomplish, is simply return two fields to Null when a date field = Today()

SIS_Status__c (Picklist)
Coma_until__c (Date field)
Dead_until__c (Date field)

The basic scenario is a sales rep will set the SIS_Status__c field located in the account record to coma or dead. Then, they will populate the date (Coma_Until__c and/or Dead_Until__c) when SIS_Status__c should be reset to Null. When Today() = the date entered in the date field, it will reset the SIS field.

Here are the three possible scenarios:

Senario 1:
SIS_Status__c = Dead
Dead_Until__c = 5/1/14
Coma_Until__c = 5/1/15

Under this scenario, when today's date = 5/1/14, it will make Dead_Until__c = null and change SIS_Status__c = Coma. Then when today's date = 5/1/15, it will change Coma_Until__C = null and SIS_Status__c = null.

Senario 2:
SIS_Status__c = Dead
Dead_Until__c = 5/1/14
Coma_Until__c = Null

Under this scenario, when today's date = 5/1/14, it will make Dead_Until__c = null and change SIS_Status__c = Null.

Senario 3:
SIS_Status__c = Coma
Dead_Until__c = Null
Coma_Until__c = 5/1/14

Under this scenario, when today's date = 5/1/14, it will make Coma_Until__c = null and change SIS_Status__c = Null.

If someone has a template trigger I could use to go off of or help me write this trigger, I would really appreciate the help!
Cheers!

Hey all,

 

First time posting on the dev boards...

 

Anyways, I have maxed out our org with Formulas, WFR's and validation rules and I am at a point where a trigger is necessary.

 

I am trying to change the Account Owner to a specific person if a Contact has:

 

1. The field "Attended_SIS_Demo__c" = True

2. Current Account Owner is someone else

3. Account Billing State = MN,ID,MT

 

If anyone would be willing to start this out for me in APEX, I would be very grateful. I unfortunately do not know much about APEX.

 

Cheers!

Here is my situation:

 

I am trying to develop a report which identifies the all the contacts related to accounts using a specific product so I can add them to a campaign.

 

We have a custom object called "Products" which is a tab that lists all of the competitor Products in our industry. Our other custom object is called "District Product" and it is a related list in Accounts that shows all the Products that an account is using.

 

I contacted support and said that I am unable to create a report to add Contacts to a campaign using Report Type because "Products" are related to an Accounts, not Contacts (I tried relating them to Contacts, but they didn't populate for some reason). However, they reccomended that I am able to create custom forumla fields that will look up the the products that an account is uing and populate those fields under the related contacts.

 

So, if Account A is using Product B, I would like all the Contacts related to Account A to display Product B in a field (as support reccomended) or another way such as displaying the "District Product" custom field in Contacts and have them populated. To play it safe, I think I should go with the formula field approach.

 

What would they formula fields look like? Any help is much appreciated!

Here is my situation:

 

I am trying to develop a report which identifies the all the contacts related to accounts using a specific product so I can add them to a campaign.

 

We have a custom object called "Products" which is a tab that lists all of the competitor Products in our industry. Our other custom object is called "District Product" and it is a related list in Accounts that shows all the Products that an account is using.

 

I contacted support and said that I am unable to create a report to add Contacts to a campaign using Report Type because "Products" are related to an Accounts, not Contacts (I tried relating them to Contacts, but they didn't populate for some reason). However, they reccomended that I am able to create custom forumla fields that will look up the the products that an account is uing and populate those fields under the related contacts.

 

So, if Account A is using Product B, I would like all the Contacts related to Account A to display Product B in a field (as support reccomended) or another way such as displaying the "District Product" custom field in Contacts and have them populated. To play it safe, I think I should go with the formula field approach.

 

What would they formula fields look like? Any help is much appreciated!

Hello everyone,

I tried creating workflow rules to meet my needs. However, the WFR will only fire when the account record is updated and I need a trigger to evaluate realtime. Unfortunately, I do not understand Apex, but I am starting to learn.

What I am trying to accomplish, is simply return two fields to Null when a date field = Today()

SIS_Status__c (Picklist)
Coma_until__c (Date field)
Dead_until__c (Date field)

The basic scenario is a sales rep will set the SIS_Status__c field located in the account record to coma or dead. Then, they will populate the date (Coma_Until__c and/or Dead_Until__c) when SIS_Status__c should be reset to Null. When Today() = the date entered in the date field, it will reset the SIS field.

Here are the three possible scenarios:

Senario 1:
SIS_Status__c = Dead
Dead_Until__c = 5/1/14
Coma_Until__c = 5/1/15

Under this scenario, when today's date = 5/1/14, it will make Dead_Until__c = null and change SIS_Status__c = Coma. Then when today's date = 5/1/15, it will change Coma_Until__C = null and SIS_Status__c = null.

Senario 2:
SIS_Status__c = Dead
Dead_Until__c = 5/1/14
Coma_Until__c = Null

Under this scenario, when today's date = 5/1/14, it will make Dead_Until__c = null and change SIS_Status__c = Null.

Senario 3:
SIS_Status__c = Coma
Dead_Until__c = Null
Coma_Until__c = 5/1/14

Under this scenario, when today's date = 5/1/14, it will make Coma_Until__c = null and change SIS_Status__c = Null.

If someone has a template trigger I could use to go off of or help me write this trigger, I would really appreciate the help!
Cheers!

Hey all,

 

First time posting on the dev boards...

 

Anyways, I have maxed out our org with Formulas, WFR's and validation rules and I am at a point where a trigger is necessary.

 

I am trying to change the Account Owner to a specific person if a Contact has:

 

1. The field "Attended_SIS_Demo__c" = True

2. Current Account Owner is someone else

3. Account Billing State = MN,ID,MT

 

If anyone would be willing to start this out for me in APEX, I would be very grateful. I unfortunately do not know much about APEX.

 

Cheers!

Here is my situation:

 

I am trying to develop a report which identifies the all the contacts related to accounts using a specific product so I can add them to a campaign.

 

We have a custom object called "Products" which is a tab that lists all of the competitor Products in our industry. Our other custom object is called "District Product" and it is a related list in Accounts that shows all the Products that an account is using.

 

I contacted support and said that I am unable to create a report to add Contacts to a campaign using Report Type because "Products" are related to an Accounts, not Contacts (I tried relating them to Contacts, but they didn't populate for some reason). However, they reccomended that I am able to create custom forumla fields that will look up the the products that an account is uing and populate those fields under the related contacts.

 

So, if Account A is using Product B, I would like all the Contacts related to Account A to display Product B in a field (as support reccomended) or another way such as displaying the "District Product" custom field in Contacts and have them populated. To play it safe, I think I should go with the formula field approach.

 

What would they formula fields look like? Any help is much appreciated!

Here is my situation:

 

I am trying to develop a report which identifies the all the contacts related to accounts using a specific product so I can add them to a campaign.

 

We have a custom object called "Products" which is a tab that lists all of the competitor Products in our industry. Our other custom object is called "District Product" and it is a related list in Accounts that shows all the Products that an account is using.

 

I contacted support and said that I am unable to create a report to add Contacts to a campaign using Report Type because "Products" are related to an Accounts, not Contacts (I tried relating them to Contacts, but they didn't populate for some reason). However, they reccomended that I am able to create custom forumla fields that will look up the the products that an account is uing and populate those fields under the related contacts.

 

So, if Account A is using Product B, I would like all the Contacts related to Account A to display Product B in a field (as support reccomended) or another way such as displaying the "District Product" custom field in Contacts and have them populated. To play it safe, I think I should go with the formula field approach.

 

What would they formula fields look like? Any help is much appreciated!