• Laura StanleyHubbard
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 12
    Replies
2 week deadline!

We have a custom object on the Account called Pricing. This object has a field called Workers Compensation Code and Last 2 Digits WC Code

The 'Workers Compensation Code' field is a 6 digit text string, and the 'Last 2 Digits' field is a formula field that pulls the far right two digits of the other field. These two digits translate to one of 50 states.

Here's the goal:

1. Search other records already created for a specific Account I'm working on within the Pricing Object to see if that 2 digit code (state) already exists
2. If the state 2 digits code is already present in any previously saved records, do nothing.
3. if the 2 digit code means a new state is being added for this account, then fire a case and a task.

Does this need to be a trigger? Can we use basic configuration to accomplish this?

Thank you!
We have a custom object on the Account called Pricing. This object has a field called "Worked In State." 

When someone attempts to add a new record and save new pricing record, we need the following to happen:

1. Search other records already created for that Account within the Pricing Object to see if Worked In State entered matches other records
2. Prevent a Save if the states match as in this would create two records with GA, LA, etc...
3. If new, then send a case and create a task (This I can handle)

Thoughts?

Thank you!
On the Account Object, I have a picklist field titled "Pay Frequency 2" with 6 picklist values including 'None'. Use case is when that picklist field says anything other than 'None' I need another field to appear on the account page titled "Pay Frequency 2 - 1st Period End Date" and populate with that picklist value. Should I use record types? Visualforce page? What's best practice? If VF page, can anyone supply code?
I have built a macro to streamline some of our processes, but Macros only run in the feed view, and here is my dilemma. When I send an email in the Detail View of a case, the 'To' field auto populates to whoever the contact is on the case. In the Feed View, this doens't happen. Is this a bug in the system? Default functionality?

I'm thinking I should make a custom button to add to the feed view that automatically pulls in the Contact info. Any suggestions on how to do that? Code? I don't want to hardcode a contact into the macro. It should be dependent on the contact on the case.
I have the following javascript code below for a contact detail page button. It creates the case as planned, but I need it to do additional items.
1. Pull the contact details from the contact record where the button is pressed
a. Contact Details are Contact Name, Email, Phone, Fax, Mobile
2. Pull Account Detail fields on the Contact Record
b. Account Name and AOID
3. Open the case in a new tab so I can continue editing it for more manual work.

Any help is appreciated. Providing code is ideal, as this is not my strength, and we need this solved in the next week! Thank you!
 
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
try{
var caseToUpdate = new sforce.SObject("Case");
caseToUpdate.Status = "Open";
caseToUpdate.Subject = "Benefit Confirmation Statement";
caseToUpdate.Description = "Benefit Elections edited. Confirmation Statement created and sent to WSE via email";
caseToUpdate.Service__c = "Health and Welfare";
caseToUpdate.Action__c = "Enrollment";
caseToUpdate.Case_Contact_Type__c = "WSE";
caseToUpdate.Origin = "Internal";
caseToUpdate.Priority = "Low";
caseToUpdate.Type_c = "Eligibility";
var result = sforce.connection.create([caseToUpdate]);
if(result[0].success == "true"){
location.reload();
}
else{
alert("An Error has Occurred. Error: " +
result[0].errors.message
);
}
}
catch(e){
alert(
"An Error has Occurred. Error: " +
e
 
We have several custom fields on our case page that need to be prepopulated for certain scenarios. Ideally, a case would be created from a contact detail page custom button (as we need it to have a custom name -- Benefit Confirmation-- the fields would be filled in, the contact and account name from that contact would also be on the case page. Any suggestions on method? Best practice? I have minimal experience with code and am really reaching for answers as we have a week and a half turn around.


Parameters:

I need these fields prepopulated:
Contact Name on Case would be Contact Name from Contact Page (Lookup Field)
Account Name on Case would be pulled from Contact Page (Lookup Field)
Contact Email and Phone would be pulled if available on Contact Page (Lookup Field)
Status = Open (Picklist)
Priority = Low (Picklist)
C3X = WSE (Picklist)
Service = Health and Welfare (Picklist)
Type = Eligibility (Picklist)
Action = Enrollment (Picklist)
Channel = Internal (Picklist)
Subject = "Benefit Confirmation Statement"
Description = "Benefit Elections Audited. Confirmation Statement created. Sent to WSE via email."

Appreciate all suggestions: Please post code/steps.



 
I need help with code or trigger as I'm trying to do the following

Take Account Team Members that have a certain role (i.e. Payroll Services Represenative), pull their userID, and then add that value to a Case List View for the Payroll Queue where that UserID is the Payroll Services Representative on that account.

Is this posisble? Account Teams don't seem to be linked anywhere. We thought about creating a field on the account page detail that pulls this info. Then, the case should be able to link to that custom field. Thoughts? Coding help?
I've added a custom button to the Contact Detail view, and I'm startig to test it's functionality. I want it to open a case and have the status default to closed.I get the error, when click on contact page, "An error has occurred. Error: Id not specific in an update call." My code is below:


{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}

try{
var caseToUpdate = new sforce.SObject("Case");

caseToUpdate.Id = "{!Case.Id}";
caseToUpdate.Status = "Closed";


var result =
sforce.connection.update([caseToUpdate]);

if(result[0].success == "true"){
location.reload();
}
else{
alert("An Error has Occurred. Error: " +
result[0].errors.message
);
}
}
catch(e){
alert(
"An Error has Occurred. Error: " +
e
);
}
I'm trying to create a visualforce email template that I can attach in a workflow that goes out to certain users/account teams whenever a case comment is created/modified.
User-added image

I can load the Apex Class but not the email template or component. I get the following error for component:

User-added image
Error with email bc  Ican't create component! Do I need to create a custom field for comments named last case comment?

User-added image
 
2 week deadline!

We have a custom object on the Account called Pricing. This object has a field called Workers Compensation Code and Last 2 Digits WC Code

The 'Workers Compensation Code' field is a 6 digit text string, and the 'Last 2 Digits' field is a formula field that pulls the far right two digits of the other field. These two digits translate to one of 50 states.

Here's the goal:

1. Search other records already created for a specific Account I'm working on within the Pricing Object to see if that 2 digit code (state) already exists
2. If the state 2 digits code is already present in any previously saved records, do nothing.
3. if the 2 digit code means a new state is being added for this account, then fire a case and a task.

Does this need to be a trigger? Can we use basic configuration to accomplish this?

Thank you!
We have a custom object on the Account called Pricing. This object has a field called "Worked In State." 

When someone attempts to add a new record and save new pricing record, we need the following to happen:

1. Search other records already created for that Account within the Pricing Object to see if Worked In State entered matches other records
2. Prevent a Save if the states match as in this would create two records with GA, LA, etc...
3. If new, then send a case and create a task (This I can handle)

Thoughts?

Thank you!
I have built a macro to streamline some of our processes, but Macros only run in the feed view, and here is my dilemma. When I send an email in the Detail View of a case, the 'To' field auto populates to whoever the contact is on the case. In the Feed View, this doens't happen. Is this a bug in the system? Default functionality?

I'm thinking I should make a custom button to add to the feed view that automatically pulls in the Contact info. Any suggestions on how to do that? Code? I don't want to hardcode a contact into the macro. It should be dependent on the contact on the case.
I have the following javascript code below for a contact detail page button. It creates the case as planned, but I need it to do additional items.
1. Pull the contact details from the contact record where the button is pressed
a. Contact Details are Contact Name, Email, Phone, Fax, Mobile
2. Pull Account Detail fields on the Contact Record
b. Account Name and AOID
3. Open the case in a new tab so I can continue editing it for more manual work.

Any help is appreciated. Providing code is ideal, as this is not my strength, and we need this solved in the next week! Thank you!
 
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
try{
var caseToUpdate = new sforce.SObject("Case");
caseToUpdate.Status = "Open";
caseToUpdate.Subject = "Benefit Confirmation Statement";
caseToUpdate.Description = "Benefit Elections edited. Confirmation Statement created and sent to WSE via email";
caseToUpdate.Service__c = "Health and Welfare";
caseToUpdate.Action__c = "Enrollment";
caseToUpdate.Case_Contact_Type__c = "WSE";
caseToUpdate.Origin = "Internal";
caseToUpdate.Priority = "Low";
caseToUpdate.Type_c = "Eligibility";
var result = sforce.connection.create([caseToUpdate]);
if(result[0].success == "true"){
location.reload();
}
else{
alert("An Error has Occurred. Error: " +
result[0].errors.message
);
}
}
catch(e){
alert(
"An Error has Occurred. Error: " +
e
 
We have several custom fields on our case page that need to be prepopulated for certain scenarios. Ideally, a case would be created from a contact detail page custom button (as we need it to have a custom name -- Benefit Confirmation-- the fields would be filled in, the contact and account name from that contact would also be on the case page. Any suggestions on method? Best practice? I have minimal experience with code and am really reaching for answers as we have a week and a half turn around.


Parameters:

I need these fields prepopulated:
Contact Name on Case would be Contact Name from Contact Page (Lookup Field)
Account Name on Case would be pulled from Contact Page (Lookup Field)
Contact Email and Phone would be pulled if available on Contact Page (Lookup Field)
Status = Open (Picklist)
Priority = Low (Picklist)
C3X = WSE (Picklist)
Service = Health and Welfare (Picklist)
Type = Eligibility (Picklist)
Action = Enrollment (Picklist)
Channel = Internal (Picklist)
Subject = "Benefit Confirmation Statement"
Description = "Benefit Elections Audited. Confirmation Statement created. Sent to WSE via email."

Appreciate all suggestions: Please post code/steps.



 
I've added a custom button to the Contact Detail view, and I'm startig to test it's functionality. I want it to open a case and have the status default to closed.I get the error, when click on contact page, "An error has occurred. Error: Id not specific in an update call." My code is below:


{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}

try{
var caseToUpdate = new sforce.SObject("Case");

caseToUpdate.Id = "{!Case.Id}";
caseToUpdate.Status = "Closed";


var result =
sforce.connection.update([caseToUpdate]);

if(result[0].success == "true"){
location.reload();
}
else{
alert("An Error has Occurred. Error: " +
result[0].errors.message
);
}
}
catch(e){
alert(
"An Error has Occurred. Error: " +
e
);
}
I'm trying to create a visualforce email template that I can attach in a workflow that goes out to certain users/account teams whenever a case comment is created/modified.
User-added image

I can load the Apex Class but not the email template or component. I get the following error for component:

User-added image
Error with email bc  Ican't create component! Do I need to create a custom field for comments named last case comment?

User-added image