• snuggles
  • NEWBIE
  • 435 Points
  • Member since 2009

  • Chatter
    Feed
  • 17
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 66
    Replies

Hello,

 

In the Professional version, is there a way to force validation on a field (we will call it field B) based on the particular item you select in a combo box.  For example, if the options in the combo box are 'test1', 'test2', and 'test3' and the requirement is not to allow the record to be saved if field B is empty and the combo box contains 'test1' or 'test3'; however, if the combo box contains 'test2' and field B is empty (null) then the record is ok to save.

 

In addition, I am trying to clearly understand the differences between the various versions and ORG, DEVELOPER, SAND BOX, etc.  Can anyone point me to the documention that gives me a better understanding of the various environments.

 

Thanks,
Tom

Those of you familiar with the table structure for Cases and Solutions know that the CaseSolution table is used to allow a many-to-many relationship.

 

I'm trying to trigger apex when the user adds a solution or removes one from the case. The problem is that you can do this without editing the case or the solution. You also cannot trigger on the CaseSolution SObject.

 

Does anyone have a suggestion for triggering on this event? 



Hi

I need to be able to call a method in a Custom Controller and pass it a parameter. I could not find a way to do this.

So basically, I came up with a workaround using a CustomComponent, passing it an Attribute. Then my CustomController for the Component uses that Attribute to determine its output.

My question is, is this slow and/or heavy?! Is there a better/easier way to do this with VisualForce page and Apex?

Here is a sample use of how I have it set up now.

VF page:
<td class="whee"><c:TranslateComponent translate="{!myVaryingText}" /></td>

 

Component:

<c:TranslateComponent:
<apex:component controller="TranslateController">
    <apex:attribute name="Translate" type="String" description="Text to be translated." required="required" assignTo="{!Translate}" />
    {!Translated}
</apex:component>

Message Edited by maraflux on 07-31-2009 03:47 PM

Hey, I keept getting the response: "No repository found at http://www.adnsandbox.com/tools/ide/install".

 

I'm not sure what's going on. According to the installation site, I should  configure Eclipse to use my proxy server.

Even with that done, I keep getting the same error message.

I have a custom formula field in the opportunity record, "Create-to-Close Interval," that simply outputs the number of days between the creation of an opportunity and its close date.  I would like to run a report that groups all my opps into Create-to-Close intervals of 0-30, 31-60, etc.  I figured that option would be in the Select Grouping window, but when I choose to sort by that field, I cannot change the "Group by" option.

 

How can I change the grouping intervals in the sort options?

 

Thanks

Hi,

 

how i can inform the Users about ther opportunities (for this month) automaticly with E-Mails.

Every user have to get only the opportunities witch the useres own.

 

Thank you.

I'm totally lost. I've taken 2 webinars, read through a pile of docs, and haven't found what I'm looking for.  I know I should be able to create a printout with our logo on it and with data from salesforce, because I saw one for 2 seconds in a webinar.  I don't need a bunch of software functionality, customer interaction, or crazy reporting for our own records, I'm just trying to get away from using Excel when all of the same information is already in salesforce!  Can anybody help me?  I'd rather not read through the entirety of the fundamentals when I know what I'm trying to do is straightforward and I can't imagine it requires a ton of know-how.  I just don't know software developer lingo, so when I think of what I want, I call it a 'report' even though that's not at all what the search engine will think I mean.

I've written pretty extensive Excel templates for our company (we basically do home inspections) and I heard that if I can do that, writing an app that will do the same thing should be a cinch.  Just can't find the first stair!

THANK YOU.

I am following a template on the Wikki that provides instructions on how to create a customer web-to-case form. I copied and pasted the class code for the custom controller and I am only getting 70% test coverage.

 

public class SubmitCaseController {

 

public Case c { get; set; }

 

public String acctNum { get; set; }

 

public SubmitCaseController() {c = new Case();

}

 

public PageReference submitCase() {

List<Account> accts = [SELECT Id FROM Account WHERE AccountNumber = :acctNum];

if (accts.size() != 1) {ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.FATAL, 'Invalid account number');

ApexPages.addMessage(msg);

return null;}

else { try {

c.AccountId = accts.get(0).Id;

 

// now look for an associated contact with the same email

 Contact cnt = [SELECT Id FROM Contact WHERE AccountId = :c.AccountId AND Email = :c.SuppliedEmail LIMIT 1]; if (cnt != null)

c.ContactId = cnt.Id;

 

// Specify DML options to ensure the assignment rules are executed

Database.DMLOptions dmlOpts = new Database.DMLOptions();

dmlOpts.assignmentRuleHeader.useDefaultRule = true;

c.setOptions(dmlOpts);

 

// Insert the case

INSERT c;

return new PageReference('/thanks');} catch (Exception e) {

ApexPages.addMessages(e);

return null;

}

}

}

}

 

 

 http://wiki.developerforce.com/index.php/Creating_Custom_Web-To-Case_Forms_Using_Visualforce_and_Sites

I'm trying to import legacy data and the Notes (and Attachments) seems to be the most logical area to put my data, but I need to create a new field in the Notes related object.  Is that even possible?  Should I just make a custom object as an Account child object?

We've found there's a lot of things that can be done either with workflows or triggers.  These typically involve doing various updates to fields.  I'm curious if anyone has any patterns for when to use a trigger vs. when to use a workflow.  Ideas?

 

Hi ,

 

I am trying to update a contact field from the parent account formula field which returns a percent.

 

Below is my code

public with sharing class HelloUpdateAccount { public static void updateAcc(Account[]accs){ // Create a list of account records from a SOQL query List<Account> accs1 = [SELECT Id,BillingCity, Name FROM Account WHERE Name = 'Acme' limit 1]; // Loop through the list and update the Name field for(Account a : accs1){ //Retrieve the contact Contact cont = new Contact(); cont = [select Name,Id from Contact where AccountId =:a.id]; cont.MailingCity = a.BillingCity; //check_tax_update__c is a test formula field which returns a percent below is the code //IF( SLAExpirationDate__c >today(), 50, 90) cont.SLA_check__c=46; //a.check_tax_update__c; update cont; } } }

 

Thanks in advance.

 

 

I'm still very new, so excuse me if I'm asking something that is obvious, but after several hours of looking I'm still coming up empty handed. It's something that seems like it should be simple but has me stumped.

 

When I create a look-up relationship in a custom object, by default I'm presented with the "magnifying glass / pop-up" combo that lets me select a related entry. Selecting that option returns me to the original form. How do I modify that pop-up window to display a multi-select field so that I can choose multiple related entries?

 

I don't need a many-to-many relationship, just a single one-to-many. Everything I read indicates it is possible, and mentions it as if it is obvious how it is done. I've seen other discuss making custom multi-select picklists, but I would be surprised if I needed to do that for a simple multi-select as I'm using it.

 

Thanks in advance.

 

 

 

 

Hi all!  I am very new to the Salesforce world and am looking for a little help (you'll see more posts from me...count on it!)

 

My current inquiry is this:

 

I want the status of a support desk case to change to "Assigned" any time a support agent (or assignement rule) changes the  "Assignment Group" (a Custom Field) to anything other than "None".

 

Is this best handled by an APEX trigger?  If so, where's the best place to start looking for APEX development documentation. 

 

Thanks for any help you all can provide!

Does anyone know where I can get or download a Visualforce Component / Attribute Hierarchy? It would be nice to know the top component and related attribute values needed if I am to use another component later on.

 

Thanks.

Can we use ant script to directly import some custom object's data to force.com platform, if so, what is the steps to do that? Thanks!

Hi,

 

When does formula evaluation happens ?

 

Can I assume that formula fields are already evaluated if I want to use their content in triggers ?

 

Where can I find documentation about this ?

 

Thanks !

 

Michel

We have been migrating code from sandbox to production using the Force.com IDE.  I am now learning how to use the ANT-based Force.com migration tool.  Does anyone have ideas about the benefits of using one tool over the other?  I cannot tell from my reading so far how to determine which tool is better and under what circumstances.

 

Additionally, does either tool work more easily with change control and versioning software for Salesforce.com?

 

Any ideas would be much appreciated.

 

-Woody

Hello,

 

In the Professional version, is there a way to force validation on a field (we will call it field B) based on the particular item you select in a combo box.  For example, if the options in the combo box are 'test1', 'test2', and 'test3' and the requirement is not to allow the record to be saved if field B is empty and the combo box contains 'test1' or 'test3'; however, if the combo box contains 'test2' and field B is empty (null) then the record is ok to save.

 

In addition, I am trying to clearly understand the differences between the various versions and ORG, DEVELOPER, SAND BOX, etc.  Can anyone point me to the documention that gives me a better understanding of the various environments.

 

Thanks,
Tom

What options do I have for users to be able to see formula values in edit mode? So far, I can only see the calculations in View mode. I'm open to anything even using an inline flex control or anything. Any ideas?

I would like to create custom tabs for some users where Contacts are split up into different subsets (Current Members, Past Members, Associate Members, etc.) and each subset represents a different tab on the UI.  Is this possible?  The subsets could be controlled by either a record type or another field (member status maybe), but should be editable, as people often change from a current member to a past member and other such changes.

 

I considered creating separate object types, but then I lose the ability to change a Contact's status, as well as all the pre-built Contact functionality. 

 

Any advice?

 

Thanks 

I have created a custom object which is going to be used for an internal support team.

 

Users will be entering in comments into the 'Comments' field that need to be date/time stamped and retained (nobody except sysadmin can edit once saved).

 

Only solution I can think of (but do not know how to accomplish):

There is a long text area field that comments will be entered.  When the record is saved, I would like to cut the text in this field and append it into another long text area field with a date/time stamp at the beginning of the line.  I can then make this field read-only to everybody but the sysadmin profile.

 

Help would be greatly appreciated!

 

 

Those of you familiar with the table structure for Cases and Solutions know that the CaseSolution table is used to allow a many-to-many relationship.

 

I'm trying to trigger apex when the user adds a solution or removes one from the case. The problem is that you can do this without editing the case or the solution. You also cannot trigger on the CaseSolution SObject.

 

Does anyone have a suggestion for triggering on this event? 

I've set up a semi-automatic email (using an HTML template) that gets sent out of SF in certain situations by an apex trigger.  This works as it should.

 

Problem is, I'm finding that MS Outlook, using its default settings, will mark the email as Junk (spam).  I want to avoid that.

 

I already turned on the SF deliverability options.  That by itself didn't solve the problem, but probably reduced the junk "score" that Outlook assigns.

 

Further testing: this template contains both an image (header on the email letterhead) and a number of links, pointing to the client's website.  I've found that if I remove either the links or the image, Outlook accepts it.  But with both if them in there, it calls it junk.

 

We generally don't have this problem w/ emails sent by services like Vertical Response.  (Maybe because the links in that case are redirects which first go to VR's domain, so the domain of the links & the email are the same??)  But we can't use VR for this, since the emails are triggered.

 

Any advice on how to improve deliverability here?  I've heard about the option of using our own mail server instead of SF's, but I don't think that's going to be feasible for this client.  Anyone got other ideas, and/or good resources for understanding how Outlook's junk filter works?

 

Thanks much!

  • August 03, 2009
  • Like
  • 0

Hi,

 

Can a Detail Page button shown on a Custom Object detail page be disabled and later enabled based on the status of the record?

Any help on this will be appreciated.

 

Regards,

OnDem 

Message Edited by OnDem Dev on 08-03-2009 09:41 PM

Hey Guys,

 

The scenario I have is this:

 

I need a visualforce page which will allow a user to select an account.  The standardObject for this page is for a custom object which does not have an existing lookup to an account therefore I cannot use the <apex:inputField />.

 

I am wondering how to approach this problem, how do I go about creating a lookup to the account object without going over governor limits?  I can only bring back 1000 records and the environment I am in has well over that.

 

Any thoughts would be greatly appreciated.  Thank you to all that post.

 

  • August 03, 2009
  • Like
  • 0

I have recruited a developer to implement Apex-based functionality on a Salesforce.com instance, and my experience so far is that although the creation of objects/fields/validation/reports/search is VERY fast compared to the likes of ASP.NET, when it comes to creating Visualforce pages and add-on functionality not supported by the primary platform it is very slow. 

 

As an example, recently my dev quoted several times the amount of time required to implement a specific feature than I know would be required to implement it in an ASP.NET app. He put this down to the cloud-based environment (yes, he's using Eclipse) and the fact that it's necessary to continually upload the code with all the tests on a regular basis.

 

It's a small app so we're not using the sandbox, instead deploying direct to production, the reasoning for that is the risks of this are quite tolerable, and overall it saves time.

 

I'm interested to hear if others generally find Apex development to be slower than other platforms.

 

Hello, Is it possible to limit the data field to Month and Year only?I am trying to create a visual force page that has a to and from date.But would like to show only Month and Year to the User.

 

When a user closes an opportunity, I would like to give them the option to send it to the A/R department for invoicing (now a workflow rule via email).  I was thinking the easiest way to do this would be that when a user closes the opportunity, there is a pop up or notification that asks the user, then fills in a checkbox field on the record (To Be Invoiced) based on their response.  The workflow rule would then have a condition to only activate if the checkbox were true.

 

I now have the checkbox on the opportunity form, but I'm not confident in the system, as I feel that the checkbox is easy to miss.  Is there a way to force the user to consider this option (like a field validation) but not force them to chose one or the other?  I thought a popup question may be what I am looking for.

 

Or if not, any other suggestions to reach the same functionality?

 

Thanks 

Are triggers synchronous or asynchronous?

 

If I make an "insert" call in an Apex method, and that insert triggers a "before" and/or an "after" trigger for that record, should I expect that those triggers complete before the next line of Apex code?

 

I think the answer is "no" - meaning that triggers are asynchronous, but I just wanted to check...



Hi

I need to be able to call a method in a Custom Controller and pass it a parameter. I could not find a way to do this.

So basically, I came up with a workaround using a CustomComponent, passing it an Attribute. Then my CustomController for the Component uses that Attribute to determine its output.

My question is, is this slow and/or heavy?! Is there a better/easier way to do this with VisualForce page and Apex?

Here is a sample use of how I have it set up now.

VF page:
<td class="whee"><c:TranslateComponent translate="{!myVaryingText}" /></td>

 

Component:

<c:TranslateComponent:
<apex:component controller="TranslateController">
    <apex:attribute name="Translate" type="String" description="Text to be translated." required="required" assignTo="{!Translate}" />
    {!Translated}
</apex:component>

Message Edited by maraflux on 07-31-2009 03:47 PM

All my test methods I have for events are failing is there a special way I need to write my test method since I am using the created date field for the business logic. It keeps saying 0% at least 1 line needs to be tested and i have several event test classess for my other triggers.Also all my other triggers call classes and this is the only one where the business logic is built inside the tirgger...do i have to create a new test method. if so, how do i call it from here

trigger Event_Before_Insert on Event (before update)
{
for( Event currentEvent : Trigger.new )
{
datetime CreatedDate =CurrentEvent.CreatedDate;
date ActivityDate =CurrentEvent.ActivityDate;

date createdDateTemp = date.newInstance(CreatedDate.year(),CreatedDate.month(),CreatedDate.day());
Integer numberofDays = createdDateTemp.daysBetween(ActivityDate);

CurrentEvent.Day_Count__c = numberofDays;


}

}

 

Message Edited by bikla78 on 07-31-2009 03:33 PM

AND(ISPICKVAL(StageName, "Quotation | Drawing Submittal"),EVO_Quote_No__c = " ")

 

My formula is not working. I am trying to a Quote Number ( the Field Type: Text) if I reach a specific Stage in the Sales Process. What am I doing wrong?