• InternalServerError
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Trying to modify the text formatting in the Screens by overriding a default setting of the CSS class. As an experiment, just trying to set text color to red. Found the class name using Chrome's Developer Tools. (Also modified the buttons, successfully based on an example given on the message board here.)

 

Text doesn't change to red - what am I missing?

 

Thanks!

Ed

 

<apex:page >

<style type="text/css">
.bPageBlock .pbBottomButtons .pbButtonb .btn { 
  color: #808080;
  display: inline;
  float: left;
  font: bold 16px arial, sans-serif;
  height: 24px;
}
</style>

<p style="color: #808080; font-size: 175%; font-weight: bolder; margin-top: 0.3em; margin-bottom: 0.2em">
  DH Interface Designer
</p>

<style type="text/css">
.theflow {
  color: #ff0000;
}
</style>
 
<div id="theflow">
  <flow:interview name="GP3_FLOW_9_1_12" buttonLocation="bottom" />
</div>
 
</apex:page><apex:page >

<style type="text/css">
.bPageBlock .pbBottomButtons .pbButtonb .btn { 
  color: #808080;
  display: inline;
  float: left;
  font: bold 16px arial, sans-serif;
  height: 24px;
}
</style>

<p style="color: #808080; font-size: 175%; font-weight: bolder; margin-top: 0.3em; margin-bottom: 0.2em">
  DH Interface Designer
</p>

<style type="text/css">
.theflow {
  color: #ff0000;
}
</style>
 
<div id="theflow">
  <flow:interview name="GP3_FLOW_9_1_12" buttonLocation="bottom" />
</div>
 
</apex:page>

 

Hello,   I have a requirement to delete entries to the Activity History after a period of time.  From looking at the following 

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_activityhistory.htm

 

I can select and view Activity history details using SOQL.  

 

SELECT (SELECT ActivityDate, Description FROM ActivityHistories)
FROM Account
WHERE Name Like 'XYZ%'

 

I cannot select from ActivityHistories itself though

 

E.g. "SELECT ActivityDate, Description FROM ActivityHistories"  does not seem to be allowed

 

If I want to retrieve from ActivityHistories (using SELECT ActivityDate, Description FROM ActivityHistories for example.   Then delete these entried based on logic relating to the date on when they were created or activitydate, does anyone know if this can be done?

 

The following article details how to delete activities http://na14.salesforce.com/help/doc/en/activity_del.htm   but I think this means having manual deletions

 

is there a way to delete activities via Apex code, or even a scheduled task or scheduled process of some type via configurations?  We would need to check on the date and delete all activities (of email for example) after a a period of time.

 

Thanks in advance.

Hi All,

 

I am trying to update a field in a case with the number of KB Articles attached to the case after a KB article has been attached to the case.

 

The problem is that the object CaseArticle doesn't seem to be available for triggers. Also, when we add a KB article to a case this doesn't cause any DML operation on the case object so I creating a trigger on the case object wouldn't work. Any ideas?

 

Thanks

I want to make a record read only based on the record type to all profiles except system admin.How to achieve this.

 

For eg. I have a record type "Candidate".For all the records which have candidate as record type should be read only to all profiles except system admin.

I am new to developing for Salesforce but I am almost positive this is a bug in their software.

 

I am trying to do a SOQL query through a parent-to-child relationship.  I have a cusom object called "Advisory Board History" with an API Name of "Advisory_Board_History__c" that is a child to a normal Contact.  Simple enough, here's my query:

 

"SELECT Name,
(
SELECT CreatedBy.Name
FROM Advisory_Board_History__r
)
FROM Contact"

 

But, it doesn't work!  It took me a while to arrive at this query too, I thought that using the "__r" instead of the normal "__c" to access the custom object through the API was smart, but alas...

 

I poked around but couldn't figure out how to fix it.  I wasn't sure if something with my syntax is wrong (again, I'm new to this), but then I went through my WSDL file (enterprise) and looked up the elements under Contact.  I found this as one of the elements:

 

<element name="Advisory_Board_Meetings__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>

 

Wait!  "Advisory_Board_Meetings__r" isn't equal to "Advisory_Board_History__r", that must be the problem!  If I substitute the "Advisory_Board_Meetings__r" API name, then the query works perfectly.  

 

BUT, I am 100% completely sure that the custom object I created is called "Advisory_Board_History__c".  It *used* to be called "Advisory_Board_Meetings__c", but then I changed it.  That change happened over 3 weeks ago, so I can't imagine that it hasn't propagated or something.

 

 

I tried changing the API name of the custom object and saving it.  The API name updates in SF and elsewhere in the WSDL (where it's called "Advisory_Board_History__c"), but NOT as a child elemet of the Contact complexType.  For example, if I change the API name to "Advisory_Board_Historyz", then it is correctly updated on SF.com and I get the following lines in my WSDL:

 

this: <complexType name="Advisory_Board_Historyz__c">...

BUT STILL: <element name="Advisory_Board_Meetings__r" nillable="true" minOccurs="0" type="tns:QueryResult"/>

 

 

I also tried removing the "Advisory Board Historyz" custom object from my Contact page layout, saving, re-adding it, saving, and then regenerating my WSDL.  Same outcome.  

 

Unless this is some really bad feature in SF, I believe this is a bug.  Put concisely, when you update the API name of a custom object, the custom object API path name (__c) is changed normally, but the custom *relationship* API path name (__r) is NOT.

 

Fortunately, I can live with this.  But if this is a bug then I want to see it fixed!  Thanks, please let me know if you have any questions.

Steps to reproduce:

 

1) Create a Task workflow rule that runs every time a record is created or edited and have the criteria be an all encompassing one (I have 1=1)

2) Have the workflow rule send an outbound message.

3) Send an email from a contact or custom object that relates to contacts.

4) No outbound message is sent. However, if you edit the email in salesforce it will then send an outbound message.

 

 

Hi all,

 

Can http request handle https URL in the request body? Does it show any eror while sending request/receiving response.

 

 HttpRequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        Http http = new Http();
        
        userId = userInfo.getUserId();
        orgId = userInfo.getOrganizationId();
        
        String URL = 'https://sample.com?&orgid='+orgid+'&userid='+Userid;
        System.debug('URL is:'+URL);
        req.setMethod('GET');
        req.setEndpoint(URL);
        req.setHeader('content-type','text/html');
        
        system.debug(req.getMethod());
        system.debug(req.getEndpoint());
        system.debug(req.getbody());
        
        try {res = http.send(req);}

Whether it produce any error in future. 

 

Thanks

  Marris

Hi,

 

I've a visualforce page that embedded with flow using <flow:interview> tag. My flow running correctly on salesforce.com environment. In this flow there is Record Create element. This flow can create Contact and Custom Object named Registration.

I've also set up Site so that visitor can running this flow. I've also set the public access setting for this site that allow user to read and create standard and custom object.

The problem is when visitor have reached step 6 / 7 and hit Next button there is error message about authentication. From what I've seen is that the error occurs when Custom Object is created from Record Create element in the flow. But what makes it bizzare is the flow running smoothly on salesforce.com Flow manager

Below is my site link so that you guys can help me troubleshoot this issue.

 

http://blueberry-services-developer-edition.na9.force.com/EventRegistration

 

Thanks & Regards

 

Currently, with the code below, when a user clicks on the OK button, if there is a validation error the page refreshes, if not the record saves successfully and the user is redirected to another page. How can I avoid the page refresh without losing the validation message displaying on the page?.

 

Or, how can I force the user to select an option (this field is a picklist) to be able to click on the OK button, this would avoid having to deal with the validation.

 

VF:

 

<apex:message/>

<apex:inputField id="reasonres" required="true" value="{!case.Reason_Resolved__c}"  />
   
<apex:commandButton action="{!closecase}" value="OK"  />

 

controller:

 

public PageReference closecase() {
        
     caseobj.status='closed';
       
     if( caseobj.Reason_Resolved__c == null ) {
   
    caseobj.Reason_Resolved__c.addError('Please select a close reason');
    
     return null;
      }else{
      
       
     caseController.save();
     
      return Page.MySupport;}
       
     }

 

 

Thanks.

 

 

I am displaying the name of the asset on a page like this <apex:outputField id="CaseField3" value="{!Case.AssetId}"/>.

 

This displays the name of the asset as a link since this is a lookup relationship, therefore, the user can click on it and is taken to the asset page. I would like to prevent that from happening, is there a way to remove the hyperlink and just display the name? or at least don't do anything if the user clicks on the link ?

 

 

 

There is a standard field Asset (a lookup) in the case object. I am trying to display the name of the asset on the VF page using standard controller. This works for any other field but not for the asset name

 

{!case.AssetId} > returns ID

{!case.Asset.Name} > returns nothing 

 

What am I missing?

 

Thanks.

I don't have much credit finding this weird thing but I wanted to know if it's a bug or if it's really intended, which I cannot imagine. 

copy paste from this blog: http://blog.tquila.com/2012/06/25/grokking-force-dot-com-apex/

 

"Unit Tests increment your Objects unique Id

This is not covered in the documentation, or atleast I haven’t found it in the Apex docs. When you run unit tests that insert/create records for a particular object(standard or otherwise), it increments the value of the Name field(of type Auto Number) outside of the test context.

Let’s say you have a custom object “Invoice Statement” (Invoice_Statement__c) that has a Name field called “Invoice Number”, and is of type “Auto Number”. The format of the field is: INV-{0000}, and let’s assume that the latest record number is INV-2058.

If you insert 10 records in the test class as follows:

 

1// Let's assume that this runs inside of a test method
2List<Invoice_Statement__c> invStatementList = new List<Invoice_Statement__c>();
3for(Integer i = 0; i < 10; i++) {
4  invStatementList.add(new Invoice_Statement__c(company='acme ltd');
5}
6insert invStatementList;

 

Now, when you insert a new Invoice Statement record outside of the test method via a trigger, or batch, or the User Interface, the next inserted record will have the id INV-2069. So don’t rely on the unique name field if you have strict rules around the auto-increment feature in your application. Instead add a custom field which is auto-incremented in a workflow or trigger to have more granular control over how the value is incremented."

 

I verified that by myself, and this indeed happen. I remember having used these numbers for customer who want to have exactly one unique number per record (especially for bills), so this could be a huge issue.

 

Anyone aware of that? I didn't find it in the Salesforce known bug ....

I figured out how to start it, but I am doing it from a button. How do i end it that way? It'd be nice if it didn't loop back around.

I am using inputfile component in VF page to upload file bt its working  and giving me error like :

 

 apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute.

 

 

I am using Rerender attribute in VF page ..If I removes that it works fine .

 

Please provide me some input ..