• Slaviša Maslić
  • NEWBIE
  • 80 Points
  • Member since 2009
  • Senior Technical Architect
  • Nefos GmbH


  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 10
    Replies

hi,

How to know our org is  Enterprise Edition, Unlimited Edition or Developer Edition ?

In salesforce any facility to found which org we r using . ??

 

Thax,

piyush parmar

Hi Friends,

 

I have one requirement in that if a Status check box is checked for a account, that account should not be edited by the user.

How to make this account as readonly.

 

Please guide me to do this.

 

Thanks.

I am trying to display the Account Name of the Case. I am running into this error message: "System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Case.Account." Any way to display the Account Name for the below code? I have checked the Schema in Eclipse on Case - AccountID and it shows c.Account.Name.

 

 

<apex:page standardController="Case" extensions="CaseListController" recordSetVar="cases" tabstyle="trouble_tickets__tab">
<apex:form id="theForm">
<apex:pageBlock title="Cases Home">
<b>You are viewing {!$User.FirstName} {!$User.LastName}'s Open and Closed Trouble Tickets</b>
</apex:pageBlock>
</apex:form>
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons location="top">
<apex:commandButton action="/apex/CustomerPortalNewCase" value="Create New Case" id="newCaseButton"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!cases}" var="c" id="c_table">
<apex:column headervalue="Case Number">
<apex:outputLink value="/{!c.Id}" target="_self">{!c.casenumber}</apex:outputLink>
</apex:column>
<apex:column headervalue="Subject">
<apex:outputLink value="/{!c.Id}" target="_self">{!c.subject}</apex:outputLink>
</apex:column>
<apex:column headervalue="Priority">
<apex:outputField value="{!c.priority}"/>
</apex:column>
<apex:column Value="{!c.status}" style="{!IF(c.Status='New', 'color:brown;font-weight: bold',IF(c.Status='In Progress', 'color:green;font-weight: bold',IF(c.Status='Triaged', 'color:orange;font-weight: bold',IF(c.Status='On Hold','color:red;font-weight: bold',IF(c.Status='Resolution Provided','color:blue;font-weight: bold',IF(c.Status='Closed - Duplicate','color:black;font-weight: bold',IF(c.Status='Closed','color:black;font-weight: bold','color:grey')))))))}"/>
<apex:column headervalue="Created By">
<apex:outputField value="{!c.createdbyID}"/>
</apex:column>
<apex:column headervalue="Case Contact">
<apex:outputField value="{!c.contact.name}"/>
</apex:column>
<apex:column headervalue="Case Account">
<apex:outputField value="{!c.account.name}"/>
</apex:column>
<apex:column headervalue="Created Date">
<apex:outputField value="{!c.createddate}"/>
</apex:column>
</apex:pageBlockTable>
<apex:panelGrid columns="2" style="font-weight: bold;">
<apex:commandLink action="{!previous}" rendered="{!hasPrevious}"><font color="blue">Previous</font></apex:commandLink>
<apex:commandLink action="{!next}" rendered="{!hasNext}"><font color="blue">Next</font></apex:commandLink>
</apex:panelGrid>
</apex:pageBlock>
<apex:pageBlock >
<apex:pageBlockSection >
<c:CaseQuickTipsGuideComponent />
<c:CaseAttachmentsInstructions />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

Message Edited by MATTYBME on 03-30-2009 05:21 AM

Hi All,

 

    I have a requirement, where in I need to delete all the Invoice Payment Line Items which has a specific record type.  For which I have written a class.  The class is working properly and we are getting the desired output, but when I am writing the test case the test case is failing and the code coverage is 54%.  

 

 

  Therefore I request you people to kindly suggest a solution such that the test case is successful and code coverage is above 75% as I need to migrate the code.

 

 

I am sending the code of  both Apex class and as well as TestCase.  Kindly look into the code and provide an appropriate solution.

 

Apex Class

 

 

public with sharing class Dev_ControlDeleteon_INV {
 String recordId;
 
    public Dev_ControlDeleteon_INV (ApexPages.StandardController controller) {recordId = controller.getId();}
    
public PageReference redirect() {
Invoice_Payment_Line_Item__c jkl;
 RecordType[] rt = [select Id,Name from RecordType];
Invoice_Payment_Line_Item__c dr=[select id,name,recordtypeId,Invoice_Number__c from Invoice_Payment_Line_Item__c where id =:recordId];
for(RecordType yt :rt){
if(dr.recordtypeId !='01290000000Kex7'){
delete dr;
  
  
  return new PageReference('/'+dr.Invoice_Number__c +'/d?retURL=%2F'+dr.Invoice_Number__c);
}
}
return null;
}
}
TestCase
@istest
private class Dev_ControlDeleteon_INVTestCase {
     static testMethod void testMyController() 
     {
   
      ApexPages.StandardController con = new ApexPages.StandardController(new Invoice_Payment_Line_Item__c());
      
      Dev_ControlDeleteon_INV  dc = new Dev_ControlDeleteon_INV(con);
      
      PageReference pr1 = dc.redirect();
      
      
       }
}

 
Regards

Arun

 

hi,

How to know our org is  Enterprise Edition, Unlimited Edition or Developer Edition ?

In salesforce any facility to found which org we r using . ??

 

Thax,

piyush parmar

I have the following SOQL used in a VisualForce page:

 

"Select c.Product__r.PA_Product_Class__c productClass, sum(c.Rolling_12_Current__c) sales from PA_Customer_History__c c where c.Account__c = '{!account.Id}' group by c.Product__r.PA_Product_Class__c"

 

The field Rolling_12_Current__c is a currency field and the records I am querying are all in USD. Our corporate currency is EUR. My user is set up with a currency of USD. When the query is run, the sum() returns back a converted value in EUR instead of USD. According to the documentation at http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_querying_currency_fields.htm, this shouldn't happen: "Currency data is converted to the user's locale and then processed by the aggregate function."

 

My user's currency is in USD, so it should display it properly in USD. As a temporary work around, I've changed our exchange rate to 1. Can someone please let me know how I can get the SOQL aggregate to return the values in my user's currency? I tried using convertCurrency, but I get a malformed query error.

The problem:  

 

I need to put a button on the standard contact page that pulls information from some fields, puts them into a URL and the converts that into base64 blob. 

 

I had no problem doing this on a different page but that page was a visual force page so I just made a function in the page's controller.  Added the button right in the visual force that called the function.

 

So, how do I do this within the restrictions of standard objects, namely the contact page? 

Hi Friends,

 

I have one requirement in that if a Status check box is checked for a account, that account should not be edited by the user.

How to make this account as readonly.

 

Please guide me to do this.

 

Thanks.

Hi,

 

I would like to create a new custom object (called Billing) with the usual 'new' button situated on the list of another 'parent' tab (also custom object called Project File). The difficult part is that I would like information contained by some of the 'Project File' fields to be automatically transferred onto the same types of field but in the new 'Billing' object. I would like this transfer to occur when clicking on the 'new' button.

 

If anyone has an idea concerning my problem, please notify me.

 

Thank you,

 

Intuitiv 

When attempting to "Refresh from Server" in Eclisp  I'm getting this error:

Severity and Description Path Resource Location Creation Time Id Refresh error: Unable to retrieve file for id 00h80000001zSig of type Layout due to an internal error:1156419708-664 (-1741087027) i360CrmLite/src package.xml line 1 1242654231283 7255

 

 

 

This started happening Monday (May 18th, 2009) morning and worked correctly last Friday.

 

Additionally, I have another development org that I have sunc'd with this one and seems to be failing the same way:

Severity and Description Path Resource Location Creation Time Id Refresh error: Unable to retrieve file for id 00h80000001zVZn of type Layout due to an internal error:1232875371-384 (-1741087027) MyDevForce/src package.xml line 1 1242656886007 7257

 

 

 

Different ID and error number, but I'm currently assuming they are the same problem. Both worked last Friday.

 

Is anyone familiar with this type of error? I found a couple similar posts, but they didn't show any resolution.

 

Thanks,

 

Jeff

I am trying to display the Account Name of the Case. I am running into this error message: "System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Case.Account." Any way to display the Account Name for the below code? I have checked the Schema in Eclipse on Case - AccountID and it shows c.Account.Name.

 

 

<apex:page standardController="Case" extensions="CaseListController" recordSetVar="cases" tabstyle="trouble_tickets__tab">
<apex:form id="theForm">
<apex:pageBlock title="Cases Home">
<b>You are viewing {!$User.FirstName} {!$User.LastName}'s Open and Closed Trouble Tickets</b>
</apex:pageBlock>
</apex:form>
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons location="top">
<apex:commandButton action="/apex/CustomerPortalNewCase" value="Create New Case" id="newCaseButton"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!cases}" var="c" id="c_table">
<apex:column headervalue="Case Number">
<apex:outputLink value="/{!c.Id}" target="_self">{!c.casenumber}</apex:outputLink>
</apex:column>
<apex:column headervalue="Subject">
<apex:outputLink value="/{!c.Id}" target="_self">{!c.subject}</apex:outputLink>
</apex:column>
<apex:column headervalue="Priority">
<apex:outputField value="{!c.priority}"/>
</apex:column>
<apex:column Value="{!c.status}" style="{!IF(c.Status='New', 'color:brown;font-weight: bold',IF(c.Status='In Progress', 'color:green;font-weight: bold',IF(c.Status='Triaged', 'color:orange;font-weight: bold',IF(c.Status='On Hold','color:red;font-weight: bold',IF(c.Status='Resolution Provided','color:blue;font-weight: bold',IF(c.Status='Closed - Duplicate','color:black;font-weight: bold',IF(c.Status='Closed','color:black;font-weight: bold','color:grey')))))))}"/>
<apex:column headervalue="Created By">
<apex:outputField value="{!c.createdbyID}"/>
</apex:column>
<apex:column headervalue="Case Contact">
<apex:outputField value="{!c.contact.name}"/>
</apex:column>
<apex:column headervalue="Case Account">
<apex:outputField value="{!c.account.name}"/>
</apex:column>
<apex:column headervalue="Created Date">
<apex:outputField value="{!c.createddate}"/>
</apex:column>
</apex:pageBlockTable>
<apex:panelGrid columns="2" style="font-weight: bold;">
<apex:commandLink action="{!previous}" rendered="{!hasPrevious}"><font color="blue">Previous</font></apex:commandLink>
<apex:commandLink action="{!next}" rendered="{!hasNext}"><font color="blue">Next</font></apex:commandLink>
</apex:panelGrid>
</apex:pageBlock>
<apex:pageBlock >
<apex:pageBlockSection >
<c:CaseQuickTipsGuideComponent />
<c:CaseAttachmentsInstructions />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

Message Edited by MATTYBME on 03-30-2009 05:21 AM
Is there any way in the API to disable all data validation rules for the current session?
 
If not this would be a very important tool espcially in the case of Merge and LeadConvert calls when bad data is merged with bad data.  Ideally we would have the ability in the header to turn off the validation rules for the current session.
 
Glenn Wilson