• kminev
  • NEWBIE
  • 125 Points
  • Member since 2008

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 94
    Questions
  • 129
    Replies

I have a object called Insertion Order which have child objects Flights. The Flights have a Look Up relationship to the Insertion Order object.

 

I want to lock down the Insertion Order object and it's children Flights when it is reviewed by the finance team. I set up an approval process and change the Insertion Order object's record type to "Reviewed". I also changed the RecordType of the Flight to "Reviewed" also.

 

The issue is how do I remove the "Edit","Delete" links from the related list  of Flights which show up on the Insertion Order?

 

 

Hi,

 

I've been trying to resolve an issue with my visual force component which has a datatable with List of objects which are stored in custom controller.

 

I have <apex:inputField> on this datatable which are bound to Sobject property and any time I click on a button my apex controller does not have the changed value from the user.

 

Below is my visual force component code:

 

<apex:component access="global" allowDML="true" controller="ProposalPdfGeneratorCmpExtension" selfClosing="true"> 

   <apex:attribute access="global" name="OpportunityId" required="false" description="This is the opportunity id!" assignTo="{!OpportunityId}" type="Id" />
   <apex:attribute access="global" name="ShowProfitMarginColumn" description="This property determines whether profit margin column will be displayed." assignTo="{!showProfitMarginColumn}" type="Boolean"/>
   <apex:attribute access="global" name="ShowSignature" description="Toggles signature panel!" assignTo="{!showSignature}" type="Boolean"/>
   <apex:attribute access="global" name="ShowPremiumDiscount" description="Toggles Premium/Discount column!" assignTo="{!showPremiumDiscount}" type="Boolean"/>

    <apex:stylesheet value="{!$Resource.ProposalCss}"/>   
    
    <apex:pageMessages id="errors"/>
    
     <div align="left" style="float: left; font-size: 10pt;">
         <apex:panelGrid columns="1" styleClass="companyTable">
            <apex:outputText value="{!$Organization.Name}" styleClass="companyName"/>
            <apex:outputText value="{!$Organization.Street}"/>
            <apex:outputText value="{!$Organization.City}, {!$Organization.State} {!$Organization.PostalCode}"/>
            <apex:outputText value="{!$Organization.Phone}"/>
         </apex:panelGrid> 
     </div>       
    
      <div align="right" style="float: right;">             
         <apex:image url="{!$Resource.MY_Logo}" width="60%" height="60%"/>
      </div>
        
      <div style="clear: both;"/>     
      
       <div align="center" class="proposalTitle">
            <apex:outputLabel styleClass="proposalTitle">{!if(opportunityProposal.Proposal_Name__c != null, opportunityProposal.Proposal_Name__c, opportunityProposal.Name)}</apex:outputLabel>       
       </div> 
                
    <div style="clear: both;"/>
  
    <br/>   
    <br/>
   
    <table width="100%" class="tableProposalLines" border="1">
        
        <tr class="tablehead">
            <td width="50%">Hours / Days</td>
            <td width="50%">Monitoring</td>            
        </tr>
        
        <tr border="1">
            <td>On Call</td>
            <td>Exchange Connectivity</td>            
        </tr>    
        
        <tr border="1">
            <td>24x7</td>
            <td>Network, Wan, and Server Infrastructure</td>            
        </tr>         
    </table>
 
     <br/><br/>

    <apex:form >
  
        <apex:outputpanel id="panelTable" >
        <!--
             <apex:dataTable id="proposalDataTable" border="1" value="{!opportunityLinesShell}" var="shell" headerClass="tablehead" styleClass="tableProposalLines" width="100%">
                
                 <apex:column headerValue="Category" width="100">
                        
                        <apex:outputLabel value="{!shell.olCategory}"/>
        
                 </apex:column>
                 
                 <apex:column headerValue="Description">
                     
                     <apex:dataTable value="{!shell.OpportunityLineItems}" var="ol">
                         <apex:column >
                             <apex:outputField value="{!ol.Proposal_Description__c}"/>
                         </apex:column>
                     </apex:dataTable>
                     
                 </apex:column>
                 
                 <apex:column headerValue="Quantity">
                     
                     <apex:dataTable value="{!shell.OpportunityLineItems}" var="ol">
                         <apex:column >
                             <apex:inputField style="text-align: center;"  value="{!ol.Count__c}"/>
                         </apex:column>
                     </apex:dataTable>
                     
                 </apex:column>   
                
                <apex:column headerValue="Premium / Discount %" width="95" rendered="{!showPremiumDiscount}">
                     
                     <apex:dataTable value="{!shell.OpportunityLineItems}" id="premiumDiscountTable" var="ol">
                         <apex:column >
                            
                            <apex:outputField value="{!ol.Premium_Discount_Percent__c}" />
    
    
                         </apex:column>
                     </apex:dataTable>
                     
                 </apex:column>
                
                <apex:column headerValue="Retail Price Per" width="95" id="priceColumn" >
                     
                     <apex:dataTable value="{!shell.OpportunityLineItems}" var="ol">
                         <apex:column >
                         
                                 <apex:inputField value="{!ol.Retail_Price__c}" />
           
                         </apex:column>
                     </apex:dataTable>
                     
                 </apex:column>
        
                       <apex:column headerValue="Subtotal" width="95" >
                     
                     <apex:dataTable value="{!shell.OpportunityLineItems}" var="ol">
                         <apex:column >
                             <apex:outputField value="{!ol.Total_Sale_Price__c}"/>
                         </apex:column>
                     </apex:dataTable>
                     
                 </apex:column> 
                 
                  <apex:column headerValue="Profit Margin%" rendered="{!showProfitMarginColumn}">
                      <apex:dataTable value="{!shell.OpportunityLineItems}" var="ol">
                         <apex:column >
                            <apex:outputField value="{!ol.Profit_Margin_Percent__c}"/>
                         </apex:column>
                     </apex:dataTable>
                 </apex:column>
                                        
             </apex:dataTable>
            -->

         <apex:dataTable value="{!opportunityLineItems}" var="ol">
             <apex:column >
                 <apex:inputField value="{!ol.Retail_Price__c}"/>
             </apex:column>
         </apex:dataTable>
         
         </apex:outputpanel>
         
    </apex:form> 

    <div style="clear: both;"/>    
    <br/>
    
    <div style="float: right; font-size: 7pt;">    
     
     <table class="tablehead">
        <tr>
            <td width="175px">Total One-Time Fee Estimate:</td>
             <td><apex:outputField value="{!opportunityProposal.SOME_FIELD}"/></td>       
        </tr>    
        
        <tr>
            <td>Total Recurring Monthly Fee Estimate:</td>
             <td><apex:outputField value="{!opportunityProposal.SOME_FIELD}"/></td>       
        </tr>  
        
        <tr>
            <td><div style="{!if(showProfitMarginColumn, "display:inline;", "display:none;")}">Profit Margin:</div></td>
            <td><apex:outputField value="{!opportunityProposal.Profit_Margin__c}" rendered="{!showProfitMarginColumn}"/></td>
        </tr>   
        <tr>
            <td><div style="{!if(showProfitMarginColumn, "display:inline;", "display:none;")}">Profit Margin%:</div></td>
            <td><apex:outputField value="{!opportunityProposal.Profit_Margin_Percent__c}" rendered="{!showProfitMarginColumn}"/></td>
        </tr>
        </table>     
        
    </div>      
    
    <div style="clear: both;"/>
     <br/><br/><br/>   
   
    <apex:dataTable border="1" styleClass="tableProposalLines" value="{!termsAndConditions}" var="tnc" width="100%" >
        <apex:column >
            {!if((tnc.T_s_C_s_Proposal_Line__c != null || tnc.T_s_C_s_Proposal_Line__c != ""), tnc.T_s_C_s_Proposal_Line__c, tnc.T_s_C_s_Pre_Defined_Proposal_Line__c)}
        </apex:column>
    </apex:dataTable> 

    <c:Proposal_Signature_Cmp id="proposalSignatureCmp" rendered="{!showSignature}"/>
    
    <apex:form >
        <div align="center">
            <br/>
            <apex:commandButton value="Save Proposal Changes" action="{!persistProposalWithOpportunity}" rerender="panelTable" />
        </div>
    </apex:form>
   
</apex:component>

 

More code will follow...

 

I am out of options at this point I tried everything.

  • April 17, 2012
  • Like
  • 0

I have a java cron job which run twice a day and sometime I get the error message show on the subject.

 

It is strange because it could be running for days w/o this error and at some point out of the blue it would choke.

 

Below is my java code where I make the call to the force.com API and process the result from the queryResult object.

 

Any help will be appreciated, Thank you.

 

private static void getOpportunityInfo(){
		
		try{
			
			boolean done = false;
			QueryResult qr = connection.query(BASE_QUERY + " WHERE RecordTypeId = '" + MY_RECORD_TYPE_ID + "' AND (Opportunity__r.CloseDate >= 2010-01-01)");
			
			if (qr.getRecords() != null && qr.getRecords().length > 0){ 
				
				log.debug("QueryResults.getRecords().length: " + qr.getRecords().length);
				
				lineItems = new ArrayList<Opportunity_Line_Item__c>();
				
				while (!done){
					
					log.debug("	Processing next batch of opportunities...");
					
					for (SObject sObj : qr.getRecords()) {
						
						try {
							
							Opportunity_Line_Item__c ol = (Opportunity_Line_Item__c)sObj;
							lineItems.add(ol);
							
						}catch(ClassCastException ex){
							log.error("Exception while processing opportunity line items!, continue with next itteration...", ex);
							continue;
						}
					}
					
					if (qr.isDone()) {
						done = true;
					} else {
						qr = connection.queryMore(qr.getQueryLocator());
					}
				}
				log.debug("Opportunity Line Items size: " + lineItems.size());
			}
		}catch(Exception e){
			log.error("Exception: ", e);
		}
	}

 

  • December 19, 2011
  • Like
  • 0

Hi,

 

I work with Decimal values and after performing some calculations I alway end up with numbers like 1.235555555

 

I need to limit my Decimal to precision to only 2 decimal places after the decimal point.

 

I don't seem to find method that does that.

 

Any ideas, I am sure is simple :)

 

Forgot to mention: This is entirely in Apex code!

 

Thank you.

  • December 14, 2011
  • Like
  • 0

All,

 

I have a java code which makes a call to salesforce retrieves object along with their attachments.

 

In java I need to be able to take the Base64 string from the Attachment (myObject.Attachment.Body) and convert it to a real file on my hard drive.

 

I am always running to encoding miss-match exceptions.

 

Any help will be tremendously appreciated.

 

Thank you.

  • November 07, 2011
  • Like
  • 0

Hi,

 

I am trying to query an existing report via a SOAP call in java can anyone provide a sample code if possible.

 

Here is what I've got so far:

 

QueryResult qr = connection.query("Select Name From Report Where Name = 'My_Report_Name'");

 

In the result I do see the name comming back, but I don't seem to be able to find a way to get the records/data from the report.

 

Any help will be appreciated.

 

Thank you.

  • September 15, 2011
  • Like
  • 0

Hi,

 

I need to come up with a piece of code that will allow me to determine if the case owner is a queue or a user, The first things that come to my mind is to run a query on the owner and try to store the result to a user obect. If it faile therefore the case owner is a queue. I don't think this is a slick solution bo any means, so I am hoping someone can provide with a better suggestion.

 

Thank you.

  • March 30, 2011
  • Like
  • 0

Hi,

 

I have the following setup. Two fields fildA and feildB on a salesforce custom object page.

 

I need to be able to do the following:

 

If user selects or enters any value in feildA then fieldB should get the same value momentarly.

 

I think some javascipt/ajax majic, but I don't have a design or plan so far.

 

Can anyone help?

 

Thank you.

  • March 15, 2011
  • Like
  • 0

Hi,

 

I am having problems configuring the email addresses on my UAT users on sandbox, because after you create the sandbox as a configuration mirror of the production all of the users' email have .test appended at the end and even if I try to change their email it does not work because the confirmation is send to the .test email which apperantly is not valid.

 

Any suggestions workaround how people handle this inconvience?

 

Thank you.

 

 

  • March 02, 2011
  • Like
  • 0

HI,

 

I looked at the documentation of salesforce and I could not find the answer to my question:

 

I would like to refresh my development sandbox which already has numerous experimental applications that I have been developing and I was wondering if I refresh it whether these applications and custom developed module object will be lost and overwritten by the production instance?

 

Thank you.

  • August 02, 2010
  • Like
  • 0

HI,

 

I have a SandBox instance that I have created a months ago and now we have a new user created on our production instance who I want to be able to acess the sandbox.

 

For some reason any new user who was created after the sandbox snapshot cannot login to the SandBox.

 

Any ideas why? Do I need to refresh my sandbox and if I do so will my changes (vforce pages, object fields) be overwritten?

 

Thanks in advance.

  • August 02, 2010
  • Like
  • 0

Hi,

 

I am  developing a flex applicaiton which connects to the salesforce api. My problem is that Flex needs to have a crossdomain.xml file located on the salesforce server in order to be granted to access the salesforce domain otherwise I get a Sanbox cross domain errors.

 

I attempted to add the file as a static resource, but in order to access the static resource you actually need to login first and access it in https envirionment.

 

Has anyone found a work-around on this?

 

Thank you.

HI,

 

I have a TextArea field which stores an email body. When I save it my email body formatting is fine and if I have multiple line I see those. However when I load this field's text from an apex and try to store it to an email and send it it all comes in one line.

 

Is there a way or an option to convert my TextArea value to the formatting that shows on the screen?

 

Thanks in advance.

Hi,

 

I am developing a component that send emails to a list of recipients via an apex code.

 

Here is my setup:

1) I create an object MyEmail which has email body some text

2) When I save this record I have trigger which calls my routine to send the email and everything works like a charm no problem....

 

Here is the issue:

 

MyEmail object is a a child to a case, so when I create a new EmailObject and send it I append the previous EmailObject messages and send them ti tge recipients as a digest email.

 

When I send the email however everything come in on line with no formatting whatsoever...

 

Any help will be appriciated.

 

Here are pieces of my Apex code:

 

This appends all the prior message and returns a string which I send from the second block of code

 

 

	private static String appendPriorUpdates(String latestNotif, Notification__c notif,  List<Notification_Message__c> prior, Boolean html){
		
		String emailBody = latestNotif;
		
		for(Notification_Message__c nm :prior){
			String tempMsgBody = '';
			
			if(html){
				tempMsgBody += '<p> Sent: ' + nm.Timestamp__c + '  |  By: ' + nm.CreatedBy.Name + '</p></br>';
				tempMsgBody += '<p>' + nm.Message__c + '</p>';
			}else{
				tempMsgBody += 'Sent: ' + nm.Timestamp__c + '  | By: ' + nm.CreatedBy.Name + '';
				tempMsgBody += nm.Message__c;
			}
			emailBody += tempMsgBody;
		}
		
		/* Append the initial notification email */
		emailBody += '<p>Initial Notification</p>';
		emailBody += ('<p> ' + notif.Notification_Sent_Hist__c + '</p>');
		emailBody += ('<p>' + notif.Notification_Reason__c + '</p>');
		
		return emailBody;
	}

 

 

Here is where I send the email:

 

	mail.setSenderDisplayName('My Name'); 
					mail.setReplyTo('recipeint@somewhere.com');						
					//mail.setBccSender(true);
					mail.setUseSignature(false);										
					mail.setSubject('My Notification :: ' + notif.Subject__c);					
									//mail.setHtmlBody(appendPriorUpdates(strNotificationMessage, notif, priorUpdates, true));
					mail.setPlainTextBody(appendPriorUpdates(strNotificationMessage, notif, priorUpdates, false));

 

Thanks in advance.

 

 

 

Hi,

 

I need to run the following query in an apex trigger:

 

I need to select contact where Account.Name IN(myArrOfAccount)

 

How dow I run this in apex?

 

Here is a sample code that I am trying to run:

 

 

String[] accs = myObj.MyMultiSelectPickList__c.split(';');

								
				Contact[] contacts = [select c.Email from Contact c where c.Account.Name IN :accs and c.ActiveCustomUser__c = true];
				

 

 

The above code simply took all the values from the pick list intead of only the selected values.

 

Any ideas.

 

Thanks in advance.

HI,

 

I need to be able to select pick list values and create an object with these pick list value via th e API in my flex component.

 

For example:

 

var myObj:SObject("MyCustomObj__c");

myObj.MyPickList__c = {Option1, Option2, Option6};

apex.create(myObj);

 

 

Any ideas as to in what format I need to pass my pick list value to the pick list field in my SObject.

 

Any help will be appriciated.

 

Thanks.

Hi,

 

I need to have a  picklist with values for example: ( Template 1, Template 2, Template 3 ) Anytime time this pick list's selection is changed I need to place different text value in a text field corresponding to a custom field.

 

I tried with an s-control and some javascript, however I was wondering if anyone managed to do this with a visual force code?

Hi,

 

Is it possible to add custom object to a price book. For example we deprecated our product object and created a new Product_Custom object.

 

My question is it possible to integrate the price book with my Product_Custom object and has anyone done this before?

 

Thank you.

  • April 13, 2010
  • Like
  • 0

HI,

 

I have my data sharing setup so people are not able to edit records after it has been approved and locked down. Now I need to wrtie an exception to people who pertain to a particular profile that can edit specific fields on this record ragardless on how the permessions are set up.

 

Is there a way this can be done with Apex code? Perahps use before update triggere and if user = "right role/profile" allow to edit fields 1,2,3....

 

Thank you.

  • April 08, 2010
  • Like
  • 0

Hi,

 

I am  in a process of configuring our organization's salesforce to share data among users and roles properly and here are several questions I have that was not able to find info in force.com documents:

 

1) On user profile there is a section Administrative permissions and there are numerous options, but I don't know what most of them mean and implement. Anyone who can provide a resource where this is explained?

 

2) I have my Hierarchical Roles set up eg Manager to Employee.... and also I specified in one my my custom objects that users can view all customobject but edit only their own. I did this on the profile level and orgnization wide sharing where I set the the "Public Read Only" property for the object in question, but the user is still able to edit everyone's records.

 

Any help will be very much appreciated.

 

Thank you.

  • March 31, 2010
  • Like
  • 0

Hi,

 

Is there a place where I can see what is the version of my salesforce. Last upgrade...?

 

Thank you.

  • March 08, 2010
  • Like
  • 0

Hi,

 

I've been trying to resolve an issue with my visual force component which has a datatable with List of objects which are stored in custom controller.

 

I have <apex:inputField> on this datatable which are bound to Sobject property and any time I click on a button my apex controller does not have the changed value from the user.

 

Below is my visual force component code:

 

<apex:component access="global" allowDML="true" controller="ProposalPdfGeneratorCmpExtension" selfClosing="true"> 

   <apex:attribute access="global" name="OpportunityId" required="false" description="This is the opportunity id!" assignTo="{!OpportunityId}" type="Id" />
   <apex:attribute access="global" name="ShowProfitMarginColumn" description="This property determines whether profit margin column will be displayed." assignTo="{!showProfitMarginColumn}" type="Boolean"/>
   <apex:attribute access="global" name="ShowSignature" description="Toggles signature panel!" assignTo="{!showSignature}" type="Boolean"/>
   <apex:attribute access="global" name="ShowPremiumDiscount" description="Toggles Premium/Discount column!" assignTo="{!showPremiumDiscount}" type="Boolean"/>

    <apex:stylesheet value="{!$Resource.ProposalCss}"/>   
    
    <apex:pageMessages id="errors"/>
    
     <div align="left" style="float: left; font-size: 10pt;">
         <apex:panelGrid columns="1" styleClass="companyTable">
            <apex:outputText value="{!$Organization.Name}" styleClass="companyName"/>
            <apex:outputText value="{!$Organization.Street}"/>
            <apex:outputText value="{!$Organization.City}, {!$Organization.State} {!$Organization.PostalCode}"/>
            <apex:outputText value="{!$Organization.Phone}"/>
         </apex:panelGrid> 
     </div>       
    
      <div align="right" style="float: right;">             
         <apex:image url="{!$Resource.MY_Logo}" width="60%" height="60%"/>
      </div>
        
      <div style="clear: both;"/>     
      
       <div align="center" class="proposalTitle">
            <apex:outputLabel styleClass="proposalTitle">{!if(opportunityProposal.Proposal_Name__c != null, opportunityProposal.Proposal_Name__c, opportunityProposal.Name)}</apex:outputLabel>       
       </div> 
                
    <div style="clear: both;"/>
  
    <br/>   
    <br/>
   
    <table width="100%" class="tableProposalLines" border="1">
        
        <tr class="tablehead">
            <td width="50%">Hours / Days</td>
            <td width="50%">Monitoring</td>            
        </tr>
        
        <tr border="1">
            <td>On Call</td>
            <td>Exchange Connectivity</td>            
        </tr>    
        
        <tr border="1">
            <td>24x7</td>
            <td>Network, Wan, and Server Infrastructure</td>            
        </tr>         
    </table>
 
     <br/><br/>

    <apex:form >
  
        <apex:outputpanel id="panelTable" >
        <!--
             <apex:dataTable id="proposalDataTable" border="1" value="{!opportunityLinesShell}" var="shell" headerClass="tablehead" styleClass="tableProposalLines" width="100%">
                
                 <apex:column headerValue="Category" width="100">
                        
                        <apex:outputLabel value="{!shell.olCategory}"/>
        
                 </apex:column>
                 
                 <apex:column headerValue="Description">
                     
                     <apex:dataTable value="{!shell.OpportunityLineItems}" var="ol">
                         <apex:column >
                             <apex:outputField value="{!ol.Proposal_Description__c}"/>
                         </apex:column>
                     </apex:dataTable>
                     
                 </apex:column>
                 
                 <apex:column headerValue="Quantity">
                     
                     <apex:dataTable value="{!shell.OpportunityLineItems}" var="ol">
                         <apex:column >
                             <apex:inputField style="text-align: center;"  value="{!ol.Count__c}"/>
                         </apex:column>
                     </apex:dataTable>
                     
                 </apex:column>   
                
                <apex:column headerValue="Premium / Discount %" width="95" rendered="{!showPremiumDiscount}">
                     
                     <apex:dataTable value="{!shell.OpportunityLineItems}" id="premiumDiscountTable" var="ol">
                         <apex:column >
                            
                            <apex:outputField value="{!ol.Premium_Discount_Percent__c}" />
    
    
                         </apex:column>
                     </apex:dataTable>
                     
                 </apex:column>
                
                <apex:column headerValue="Retail Price Per" width="95" id="priceColumn" >
                     
                     <apex:dataTable value="{!shell.OpportunityLineItems}" var="ol">
                         <apex:column >
                         
                                 <apex:inputField value="{!ol.Retail_Price__c}" />
           
                         </apex:column>
                     </apex:dataTable>
                     
                 </apex:column>
        
                       <apex:column headerValue="Subtotal" width="95" >
                     
                     <apex:dataTable value="{!shell.OpportunityLineItems}" var="ol">
                         <apex:column >
                             <apex:outputField value="{!ol.Total_Sale_Price__c}"/>
                         </apex:column>
                     </apex:dataTable>
                     
                 </apex:column> 
                 
                  <apex:column headerValue="Profit Margin%" rendered="{!showProfitMarginColumn}">
                      <apex:dataTable value="{!shell.OpportunityLineItems}" var="ol">
                         <apex:column >
                            <apex:outputField value="{!ol.Profit_Margin_Percent__c}"/>
                         </apex:column>
                     </apex:dataTable>
                 </apex:column>
                                        
             </apex:dataTable>
            -->

         <apex:dataTable value="{!opportunityLineItems}" var="ol">
             <apex:column >
                 <apex:inputField value="{!ol.Retail_Price__c}"/>
             </apex:column>
         </apex:dataTable>
         
         </apex:outputpanel>
         
    </apex:form> 

    <div style="clear: both;"/>    
    <br/>
    
    <div style="float: right; font-size: 7pt;">    
     
     <table class="tablehead">
        <tr>
            <td width="175px">Total One-Time Fee Estimate:</td>
             <td><apex:outputField value="{!opportunityProposal.SOME_FIELD}"/></td>       
        </tr>    
        
        <tr>
            <td>Total Recurring Monthly Fee Estimate:</td>
             <td><apex:outputField value="{!opportunityProposal.SOME_FIELD}"/></td>       
        </tr>  
        
        <tr>
            <td><div style="{!if(showProfitMarginColumn, "display:inline;", "display:none;")}">Profit Margin:</div></td>
            <td><apex:outputField value="{!opportunityProposal.Profit_Margin__c}" rendered="{!showProfitMarginColumn}"/></td>
        </tr>   
        <tr>
            <td><div style="{!if(showProfitMarginColumn, "display:inline;", "display:none;")}">Profit Margin%:</div></td>
            <td><apex:outputField value="{!opportunityProposal.Profit_Margin_Percent__c}" rendered="{!showProfitMarginColumn}"/></td>
        </tr>
        </table>     
        
    </div>      
    
    <div style="clear: both;"/>
     <br/><br/><br/>   
   
    <apex:dataTable border="1" styleClass="tableProposalLines" value="{!termsAndConditions}" var="tnc" width="100%" >
        <apex:column >
            {!if((tnc.T_s_C_s_Proposal_Line__c != null || tnc.T_s_C_s_Proposal_Line__c != ""), tnc.T_s_C_s_Proposal_Line__c, tnc.T_s_C_s_Pre_Defined_Proposal_Line__c)}
        </apex:column>
    </apex:dataTable> 

    <c:Proposal_Signature_Cmp id="proposalSignatureCmp" rendered="{!showSignature}"/>
    
    <apex:form >
        <div align="center">
            <br/>
            <apex:commandButton value="Save Proposal Changes" action="{!persistProposalWithOpportunity}" rerender="panelTable" />
        </div>
    </apex:form>
   
</apex:component>

 

More code will follow...

 

I am out of options at this point I tried everything.

  • April 17, 2012
  • Like
  • 0

I have a java cron job which run twice a day and sometime I get the error message show on the subject.

 

It is strange because it could be running for days w/o this error and at some point out of the blue it would choke.

 

Below is my java code where I make the call to the force.com API and process the result from the queryResult object.

 

Any help will be appreciated, Thank you.

 

private static void getOpportunityInfo(){
		
		try{
			
			boolean done = false;
			QueryResult qr = connection.query(BASE_QUERY + " WHERE RecordTypeId = '" + MY_RECORD_TYPE_ID + "' AND (Opportunity__r.CloseDate >= 2010-01-01)");
			
			if (qr.getRecords() != null && qr.getRecords().length > 0){ 
				
				log.debug("QueryResults.getRecords().length: " + qr.getRecords().length);
				
				lineItems = new ArrayList<Opportunity_Line_Item__c>();
				
				while (!done){
					
					log.debug("	Processing next batch of opportunities...");
					
					for (SObject sObj : qr.getRecords()) {
						
						try {
							
							Opportunity_Line_Item__c ol = (Opportunity_Line_Item__c)sObj;
							lineItems.add(ol);
							
						}catch(ClassCastException ex){
							log.error("Exception while processing opportunity line items!, continue with next itteration...", ex);
							continue;
						}
					}
					
					if (qr.isDone()) {
						done = true;
					} else {
						qr = connection.queryMore(qr.getQueryLocator());
					}
				}
				log.debug("Opportunity Line Items size: " + lineItems.size());
			}
		}catch(Exception e){
			log.error("Exception: ", e);
		}
	}

 

  • December 19, 2011
  • Like
  • 0

Hi,

 

I work with Decimal values and after performing some calculations I alway end up with numbers like 1.235555555

 

I need to limit my Decimal to precision to only 2 decimal places after the decimal point.

 

I don't seem to find method that does that.

 

Any ideas, I am sure is simple :)

 

Forgot to mention: This is entirely in Apex code!

 

Thank you.

  • December 14, 2011
  • Like
  • 0

Does anyone else experience slowness when try refresh or create new project in Force.com Ide? Mine takes 10 minutest to do so... I tried different comuters, different networks... all the same... production is on summer'11 and works fine...

  • September 23, 2011
  • Like
  • 0

Hi,

 

I need to come up with a piece of code that will allow me to determine if the case owner is a queue or a user, The first things that come to my mind is to run a query on the owner and try to store the result to a user obect. If it faile therefore the case owner is a queue. I don't think this is a slick solution bo any means, so I am hoping someone can provide with a better suggestion.

 

Thank you.

  • March 30, 2011
  • Like
  • 0

Hi,

 

I have the following setup. Two fields fildA and feildB on a salesforce custom object page.

 

I need to be able to do the following:

 

If user selects or enters any value in feildA then fieldB should get the same value momentarly.

 

I think some javascipt/ajax majic, but I don't have a design or plan so far.

 

Can anyone help?

 

Thank you.

  • March 15, 2011
  • Like
  • 0

Hi,

 

I am having problems configuring the email addresses on my UAT users on sandbox, because after you create the sandbox as a configuration mirror of the production all of the users' email have .test appended at the end and even if I try to change their email it does not work because the confirmation is send to the .test email which apperantly is not valid.

 

Any suggestions workaround how people handle this inconvience?

 

Thank you.

 

 

  • March 02, 2011
  • Like
  • 0

HI,

 

I looked at the documentation of salesforce and I could not find the answer to my question:

 

I would like to refresh my development sandbox which already has numerous experimental applications that I have been developing and I was wondering if I refresh it whether these applications and custom developed module object will be lost and overwritten by the production instance?

 

Thank you.

  • August 02, 2010
  • Like
  • 0

HI,

 

I have a SandBox instance that I have created a months ago and now we have a new user created on our production instance who I want to be able to acess the sandbox.

 

For some reason any new user who was created after the sandbox snapshot cannot login to the SandBox.

 

Any ideas why? Do I need to refresh my sandbox and if I do so will my changes (vforce pages, object fields) be overwritten?

 

Thanks in advance.

  • August 02, 2010
  • Like
  • 0

HI,

 

I have a TextArea field which stores an email body. When I save it my email body formatting is fine and if I have multiple line I see those. However when I load this field's text from an apex and try to store it to an email and send it it all comes in one line.

 

Is there a way or an option to convert my TextArea value to the formatting that shows on the screen?

 

Thanks in advance.

HI,

 

I need to be able to select pick list values and create an object with these pick list value via th e API in my flex component.

 

For example:

 

var myObj:SObject("MyCustomObj__c");

myObj.MyPickList__c = {Option1, Option2, Option6};

apex.create(myObj);

 

 

Any ideas as to in what format I need to pass my pick list value to the pick list field in my SObject.

 

Any help will be appriciated.

 

Thanks.

Hi,

 

I need to have a  picklist with values for example: ( Template 1, Template 2, Template 3 ) Anytime time this pick list's selection is changed I need to place different text value in a text field corresponding to a custom field.

 

I tried with an s-control and some javascript, however I was wondering if anyone managed to do this with a visual force code?

Hi,

 

I've been trying to login to my sandbox with flex toolkit and it is day number 3 with no success I looked at many threads with people having this issue, but I was not able to find a solution to my problem.

 

I tried with the token and with out, also with test.salesforce.com and w / o technically everything that I could. Also I checked and my username and password are correct since I was able to login to sandbox with these credentials.

 

Here is my code snippet:

 

var lr:LoginRequest = new LoginRequest();
                lr.username = "kiril@mail.com.kirilsand";
                lr.password = "myPasswordLsuKA6tMDPQcobimbnqRd9sY";
                //lr.server_url = "https://tapp0.salesforce.com/service/Soap/17.0";
                //lr.server_url = "test.salesforce.com";
               
                lr.callback = new AsyncResponder(logedInToSand, loginToSandFault);
               
                //trace("lr = " + ObjectUtil.toString(lr));
                //apexTest.serverUrl = "test.salesforce.com";
               
                apexTest.login(lr);

 

 

Any help will be appreciated. I alway get the fault exception username or password invalid or user locked out.

 

Thanks in advance. 

 

  • January 18, 2010
  • Like
  • 0

I'm following the Flex Mashup tutorial

 

http://wiki.developerforce.com/index.php/Creating_a_Flex_Mashup_on_Force.com

 

I'm getting a policy file warning that's preventing me from authenticating

 

Warning: Domain www.salesforce.com does not explicitly specify a meta-policy, but Content-Type of policy file https://www.salesforce.com/crossdomain.xml is 'text/x-cross-domain-policy'.  Applying meta-policy 'by-content-type'.

 

I know salesforce policy files have been a stumbling block for developers in the past but I haven't seen any documentation that points me in the right direction. 

 

I've tried Security.loadPolicy("https://www.salesforce.com/crossdomain.xml"); to no avail.

I have set up a customer portal and now want to have Single sign on to it from our company website .. I am really struggling with this as I can see "Is SSO enabled" in a normal users profile under General User Permissions but there does not seem to be anywhere to set it in a Portal user's profile .. I've had our web developer review all the Wiki entries and it all makes perfect sense apart from the bit about "make sure the portal user profile has "Is Single-sign-on enabled" checked and you are using the correct login URLs."
 
Has anyone already set this up and could give me some direction?
 
Jaz
Hi,
I am currently developing a 'Contact Us' form using Visual force. I have two related fields in the form - a picklist field and an email text area field.
The picklist fields must be loaded with the names of email templates. And if an email template name is selected, the corresponding email template contents should be automatically rendered and populated in email text area field. Can anyone tell me how to do this?
 
 
Thanks
 
Ghanashyam