• alibzafar
  • NEWBIE
  • 173 Points
  • Member since 2011


  • Chatter
    Feed
  • 6
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 44
    Replies
HI, If error occurs when inserting records from data loader to salesforce org. It will be inserting records partially or stops inserting.If it stops inserting, agian we will strat inserting records from starting. Thanks in advance...

I seem to be having an issue with the Encrypt or decrypt portion of the password process.

 

Even i added security token to it but same problem.

 

 

0 [main] INFO com.salesforce.dataloader.process.ProcessConfig  - Loading process
 configuration from config file: C:\Datalodercli\process-conf.xml
47 [main] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader  -
Loading XML bean definitions from file [C:\Datalodercli\process-conf.xml]
47 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanDefinitionReader  -
 Using JAXP implementation [com.sun.org.apache.xerces.internal.jaxp.DocumentBuil
derFactoryImpl@1256ea2]
62 [main] DEBUG org.springframework.beans.factory.xml.ResourceEntityResolver  -
Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN] and system
62 [main] DEBUG org.springframework.beans.factory.xml.ResourceEntityResolver  -
Trying to locate [spring-beans.dtd] in Spring jar
78 [main] DEBUG org.springframework.beans.factory.xml.ResourceEntityResolver  -
th
94 [main] DEBUG org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionPa
rser  - Loading bean definitions
94 [main] DEBUG org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionPa
rser  - Default lazy init 'false'
94 [main] DEBUG org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionPa
rser  - Default autowire 'no'
94 [main] DEBUG org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionPa
rser  - Default dependency check 'none'
94 [main] INFO org.springframework.core.CollectionFactory  - JDK 1.4+ collection
s available
94 [main] INFO org.springframework.core.CollectionFactory  - Commons Collections
 3.x available
109 [main] DEBUG org.springframework.core.CollectionFactory  - Creating [java.ut
il.LinkedHashMap]
109 [main] DEBUG org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionP
arser  - Found 1 <bean> elements in file [C:\Datalodercli\process-conf.xml]
109 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanFactory  - Creatin
g instance of bean 'accountMasterProcess' with merged definition [Root bean: cla
ss [com.salesforce.dataloader.process.ProcessRunner]; abstract=false; singleton=
false; lazyInit=false; autowire=0; dependencyCheck=0; initMethodName=null; destr
oyMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in file
 [C:\Datalodercli\process-conf.xml]]
109 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanFactory  - Invokin
g BeanPostProcessors before instantiation of bean 'accountMasterProcess'
125 [main] DEBUG org.springframework.beans.CachedIntrospectionResults  - Getting
 BeanInfo for class [com.salesforce.dataloader.process.ProcessRunner]
125 [main] DEBUG org.springframework.beans.CachedIntrospectionResults  - Caching
 PropertyDescriptors for class [com.salesforce.dataloader.process.ProcessRunner]
 
140 [main] DEBUG org.springframework.beans.CachedIntrospectionResults  - Found p
roperty 'class' of type [java.lang.Class]
140 [main] DEBUG org.springframework.beans.CachedIntrospectionResults  - Found p
roperty 'configOverrideMap' of type [java.util.Map]
140 [main] DEBUG org.springframework.beans.CachedIntrospectionResults  - Found p
roperty 'controller' of type [com.salesforce.dataloader.controller.Controller]
140 [main] DEBUG org.springframework.beans.CachedIntrospectionResults  - Found p
roperty 'name' of type [java.lang.String]
140 [main] DEBUG org.springframework.beans.CachedIntrospectionResults  - Class [
com.salesforce.dataloader.process.ProcessRunner] is cache-safe
156 [main] DEBUG org.springframework.core.CollectionFactory  - Creating [java.ut
il.LinkedHashMap]
156 [main] DEBUG org.springframework.beans.BeanWrapperImpl  - About to invoke wr
ite method [public synchronized void com.salesforce.dataloader.process.ProcessRu
nner.setName(java.lang.String)] on object of class [com.salesforce.dataloader.pr
ocess.ProcessRunner]
172 [main] DEBUG org.springframework.beans.BeanWrapperImpl  - Invoked write meth
od [public synchronized void com.salesforce.dataloader.process.ProcessRunner.set
Name(java.lang.String)] with value of type [java.lang.String]
172 [main] DEBUG org.springframework.beans.BeanWrapperImpl  - About to invoke wr
ite method [public synchronized void com.salesforce.dataloader.process.ProcessRu
nner.setConfigOverrideMap(java.util.Map)] on object of class [com.salesforce.dat
aloader.process.ProcessRunner]
172 [main] DEBUG org.springframework.beans.BeanWrapperImpl  - Invoked write meth
od [public synchronized void com.salesforce.dataloader.process.ProcessRunner.set
ConfigOverrideMap(java.util.Map)] with value of type [java.util.Map]
187 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanFactory  - Invokin
g BeanPostProcessors before initialization of bean 'accountMasterProcess'
187 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanFactory  - Invokin
g afterPropertiesSet() on bean with name 'accountMasterProcess'
187 [main] DEBUG org.springframework.beans.factory.xml.XmlBeanFactory  - Invokin
g BeanPostProcessors after initialization of bean 'accountMasterProcess'
219 [accountMasterProcess] INFO com.salesforce.dataloader.controller.Controller
 - The controller config has been initialized
219 [accountMasterProcess] INFO com.salesforce.dataloader.process.ProcessRunner
 - Initializing process engine
219 [accountMasterProcess] INFO com.salesforce.dataloader.process.ProcessRunner
 - Loading parameters
922 [accountMasterProcess] ERROR com.salesforce.dataloader.config.Config  - Erro
r loading parameter: sfdc.password of type: java.lang.String
java.lang.NumberFormatException: For input string: "as"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
        at java.lang.Integer.parseInt(Integer.java:456)
        at java.lang.Integer.valueOf(Integer.java:526)
        at java.lang.Integer.decode(Integer.java:919)
        at com.salesforce.dataloader.security.EncryptionUtil.textToBytes(Encrypt
ionUtil.java:58)
        at com.salesforce.dataloader.security.EncryptionUtil.decryptString(Encry
ptionUtil.java:194)
        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6
68)
        at com.salesforce.dataloader.config.Config.postLoad(Config.java:620)
        at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config
.java:646)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:95)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:75)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:227)
969 [main] FATAL com.salesforce.dataloader.process.ProcessRunner  - Unable to ru
n process accountMasterProcess
java.lang.RuntimeException: com.salesforce.dataloader.exception.ParameterLoadExc
eption: Error loading parameter: sfdc.password of type: java.lang.String
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:137)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:75)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:227)
Caused by: com.salesforce.dataloader.exception.ParameterLoadException: Error loa
ding parameter: sfdc.password of type: java.lang.String
        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6
83)
        at com.salesforce.dataloader.config.Config.postLoad(Config.java:620)
        at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config
.java:646)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:95)
        ... 2 more
Caused by: java.lang.NumberFormatException: For input string: "as"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
        at java.lang.Integer.parseInt(Integer.java:456)
        at java.lang.Integer.valueOf(Integer.java:526)
        at java.lang.Integer.decode(Integer.java:919)
        at com.salesforce.dataloader.security.EncryptionUtil.textToBytes(Encrypt
ionUtil.java:58)
        at com.salesforce.dataloader.security.EncryptionUtil.decryptString(Encry
ptionUtil.java:194)
        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6
68)
        ... 5 more
 
 
My process-conf.xml Files:
 

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="accountMasterProcess"
class="com.salesforce.dataloader.process.ProcessRunner"
singleton="false">
<description>accountInsert job gets the account record from the CSV file
and inserts it into Salesforce.</description>
<property name="name" value="accountMasterProcess"/>
<property name="configOverrideMap">
<map>
<entry key="sfdc.debugMessages" value="true"/>
<entry key="sfdc.debugMessagesFile"
value="C:\Datalodercli\accountInsertSoapTrace.log"/>
<entry key="sfdc.endpoint" value="https://login.salesforce.com"/>
<entry key="sfdc.username" value="mvrsreddy@gmail.com"/>
<entry key="sfdc.password" value="9016019f5e18b6c75f993da5924fd33bB0aszGmt639q7ut2j7UKT3ux"/>
<entry key="process.encryptionKeyFile"
value="C:\Datalodercli\key.txt"/>
<entry key="sfdc.timeoutSecs" value="600"/>
<entry key="sfdc.loadBatchSize" value="200"/>
<entry key="sfdc.entity" value="Account"/>
<entry key="process.operation" value="insert"/>
<entry key="process.mappingFile"
value="C:\Datalodercli\account.sdl"/>
<entry key="dataAccess.name"
value="C:\Datalodercli\accountInsert.csv"/>
<entry key="process.outputSuccess"
value="C:\Datalodercli\accountInsert_success.csv"/>
<entry key="process.outputError"
value="C:\Datalodercli\accountInsert_error.csv"/>
<entry key="dataAccess.type" value="csvRead"/>
<entry key="process.initialLastRunDate"
value="2005-12-01T00:00:00.000-0800"/>
</map>
</property>
</bean>
</beans>

 



Thanks in advance.

I am using a trigger to upsert a custom object using data loader.  I need to set the createdby field on the object as the Owner of the related account.  My trigger is telling me the createdby field is not a writeable field.  How do I set this value?  Would I be better off adding a custom field and assigning my owner to that field?

  • June 12, 2012
  • Like
  • 0

Hello,  I have a visualforce page and custom controller which I will be using to render a form to a user using XML as an input to my class and in it the fields are contained.  I wish to dynamically render my form to the user but the type of field will be contained in the xml data and subsequently parsed in my class.  I wondered how I could determine the correct field type to display to my user.  For example the following

 

                <apex:repeat value="{!FieldsList}" var="f">
                        <apex:outputField value="{!r[f]}" />
                </apex:repeat>

 

 

I don't know whether I should be putting <apex:inputText>   <apex:selectList>  etc when I'm coding my visualforce page. The type of field will come in with the XML and this type does not match selectList for example it would be called something else relating to a List.

 

Does anyone know if I can do something in my <apex:  tag to set different field types based on values received from the Controller?   Any help on this would be appreciated.

 

Thanks!

HI, 

 

Is there any way that I can set expiration password date for any user or profile? 

 

Thanks 

I am trying to get a list of feedItems between the date enter by a user  

 

Here is my apex code

 

 

public dateTime startDate{get; set;}
public dateTime endDate{get; set;}

 

public void getFeeds(){

 

 List<FeedItem> fi = [Select Id from FeedItem where createdDate > startDate and createdDate < endDate)];

 

}

 


Getting Error: FeedController Compile Error: unexpected token: 'startDate'  

 

 

Thanks 

I am testing to post file cotent to feedcomment from SOAP UI,  I am successfully able to post file to my feedItem but not in feedcomment. 

 

Here is my request xml for posting file content in feedcomment

 

 <sObjects xsi:type="FeedComment">
            <FeedItemId>${#TestCase#FeedItemId}</FeedItemId>
            <CommentBody>${#TestCase#Body}</CommentBody>
            <commentType>${#TestCase#ContentComment}</commentType>
 </sObjects>

 And here is the working one for feedItem 

 

<sObjects xsi:type="FeedItem">
           <ParentId>${#TestCase#ParentId}</ParentId>
           <Type>ContentPost</Type>
           <ContentData>${#TestCase#ContentData}</ContentData>
           <ContentFileName>${#TestCase#ContentFileName}</ContentFileName>
</sObjects>

 

I think there is some issue with order in how to send it, or I am missing few fields, see this link http://www.salesforce.com/us/developer/docs/api/index_Left.htm#CSHID=sforce_api_objects_feeditem.htm|StartTopic=Content%2Fsforce_api_objects_feeditem.htm|SkinName=webhelp

 

 

Thanks 

Hi , 

 

I am Installing a salesforce app on my enterprise org , and recieving this error "Missing Organization Feature: Campaign" . 

 

I cannot see a Campaign object in my current Org. Anyone know how to enable this? 

 

Thanks 

 

 

I want to do similar thing below , but using a Map, is there any similar funcationality available?

 

The list or set iteration for loop iterates over all the elements in a list or set. Its syntax is:


for (variable : list_or_set) {
code_block
}

 

where variable must be of the same primitive or sObject type as list_or_set. When executing this type of for loop, the Apex runtime engine assigns variable to each element in list_or_set, and runs the code_block for each value. For example, the following code outputs the numbers 1 - 10 to the debug log:

 

Integer[] myInts = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
for (Integer i : myInts) {
System.debug('test test');

}

 

 

I tried this but got error, 

 

public Map<Integer, myClass>  myItems;

 

for (myClass item : this.myItems){}

 

Save error: Loop must iterate over a collection type: MAP<Integer,myClass> :( 

 

Can anyone help on this?

 

Thanks 

 

Hi, 

 

I am receiving  this  error in my test class , when I want to throw exception in try {}. 

 

Here is my code 

 

@isTest(seeAllData = false) 
public with sharing class MyClass_Test {
	private static testmethod void loggerTest(){
		Test.startTest();
		try {
 				throw new Exception('testing');
			}catch (Exception ex) {
     			 MyClass.myMethod(ex);
			}
		Test.stopTest();
	}
}  

 

Error receiving 

Save error: Type cannot be constructed: Exception.  

 

Can anyone help me on this. 

 

Thanks 

Ali 

I am exceeding API request Limit, I am using Salesforce Professional Edition and updating records in it from a .Net Application. 

 

.Net application updates multiple object at a time (Accounts, Contacts, Opportunity, Cases) 

 

I have tried to make my .net code efficient , but still I am exceeding limit, and than I have to wait 24 hours until it releases the limit. Is there any way to Increase API limit or any other way? 

HI , 

 

I am facing issue with my .net webservice, when I am running it locally it is successful, but when I am uploading on my webhost I am having different results. 

 

Below is the code for my webservice named as AccountNotificationListener.asmx

<%@ WebService  Language="C#" CodeBehind="~/App_Code/AccountNotificationServiceImpl.cs" Class="Test.AccountNotificationServiceImpl" %>

 The code for AccountNotificationServiceImpl.cs is :

using System;
using System.Collections.Generic;
using System.Web.Services;
namespace Test
{

   [WebService(Namespace = "http://argentinanet.org/")]
   
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    /// <summary>
    /// Summary description for AccountNotificationServiceImpl
    /// </summary>
    /// 
 
    public class AccountNotificationServiceImpl : AccountNotification.INotificationBinding
    {
        public AccountNotificationServiceImpl()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public AccountNotification.notificationsResponse notifications(AccountNotification.notifications notifications1)
        {
            throw new NotImplementedException();
        }
    }
}

 

Webservice is deployed on link http://argentinanet.org/testproject/website/AccountNotificationService.asmx 

 

When you will click on this link you fill find the error that I am receiving Parser Error Message: Could not create type 'Test.AccountNotificationServiceImpl'. Can anyone help me out ?

 

Thanks 

Ali 

 

I am trying to invoke the .Net application from Salesforce outbound message , my web service is hosted on http://amanpreet.info/ws/MyNotificationListener.asmx . This is also the endpoint url I am giving in Outbound message. 

When I go to Administrator Setup > Monitoring > Outbound Messages,to track my Outbound message I see delivery failure reason as "org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed."

I cannot figure it out where the issue could be, it seems that my wsdl or web service is not well formed  ,but I have crossed check it. Anyone who have invoked .Net application from outbound message can may be help me out ? 

 

Thanks 

Ali 

Hi , 

 

I am Installing a salesforce app on my enterprise org , and recieving this error "Missing Organization Feature: Campaign" . 

 

I cannot see a Campaign object in my current Org. Anyone know how to enable this? 

 

Thanks 

 

I have related list under account object for suppose an account record has 5 related recored on a object, can  i get thosed related list in account field?


User-added image
As shown in the above image, this is a related list on Account object, so i need a field on account object and show all the related list names in the field 

for example : 

Account_field1__c =  Contarct name 1 , contract name 2 , contract name 3 ........ contract name 6 .
Account_field1__c =  619754.1STD ,619744STD,619733STD,619730STD,617208.6STD.



is this possible ?
  • August 15, 2017
  • Like
  • 0
Hi All,
I have a VF page witn drop-down field "Selection" (value1 - 'All'; value2 - 'Partial') and a list of objects. For each object there is a checkbox. If value1 - 'All' is selected in drop-down - all of checboxes should be checked in list. If value2 - 'Partial' is selected in drop-down - than I need to select at least one checkbox.
How can I do this?
Thanks!
 

Hi!
I cannot build this with workflow, so I will need a trigger built to do the following:

Create a task record on the Case object when a Case record is created with Record Type and Account Name is not Null

I have a trigger that fires when an opportunity is updated, as part of that I need to call our API with some detail from the opportunity.

As per many suggestions on the web I've created a class that contains a @future method to make the callout.

I'm trying to catch an exception that gets thrown in the @future method, but the test method isn't seeing it.

The class under test looks like this:

public with sharing class WDAPIInterface {
    public WDAPIInterface() {

    }

    @future(callout=true) public static void send(String endpoint, String method, String body)  {
        HttpRequest req = new HttpRequest();
        req.setEndpoint(endpoint);
        req.setMethod(method);
        req.setBody(body);

        Http http = new Http();
        HttpResponse response = http.send(req);

        if(response.getStatusCode() != 201) {
            System.debug('Unexpected response from web service, expecte response status status 201 but got ' + response.getStatusCode());
            throw new WDAPIException('Unexpected response from web service, expecte response status status 201 but got ' + response.getStatusCode());
        }
    }
}

here's the unit test:

@isTest static void test_exception_is_thrown_on_unexpected_response() {
        try {
            WDHttpCalloutMock mockResponse = new WDHttpCalloutMock(500, 'Complete', '', null);
            WDAPIInterface.send('https://example.com', 'POST', '{}');
        } catch (WDAPIException ex) {
            return;
        }

        System.assert(false, 'Expected WDAPIException to be thrown, but it wasnt');
    }
Now, I've read that the way to test @future methods is to surround the call with Test.startTest() & Test.endTest(), however when I do that I get another error:

METHOD RESULT 
test_exception_is_thrown_on_unexpected_response : Skip

 MESSAGE 
Methods defined as TestMethod do not support Web service callouts, test skipped
So the question is, how do I unit test a @future method that makes an callout?

I have a group of custom activity fields, however I cant find them in either Task or Event, so I am wondering if they are stored some where else?
If i try to query on Force.com explorer:

SELECT  id, custom_field__c FROM EVENT
or
SELECT  id, custom_field__c FROM TASK

No such column on entity task or event
  • July 30, 2014
  • Like
  • 0
So, the requirement is to create a record on a custom object, from Opportunity.  However, we do not want it to be a related record/list.

1)  I assume, since the resulting record is not related to the Opportunity, I can't just use a hacked URL button to build the record?
2)  I believe I'll have to use JavaScript (unless there's another option) to build the record?  I thought about trying to fire a class from a button click to do this, but I'm just not sure how far to go.
3)  If I do need to use JavaScript, can I have the new record open in a not-saved status, and more importantly, return to the Opportunity after save, or have I just made the entire script overly complex?

Thank you.
Hi

I have 3 fields
Base_Line_Hrs__c,Base_line_Billing_Rate_In_SOW_Currency__c these fields are 'Number format'.
FX_Rate_to_USD__c this field 'Formula(Number)' in this field i written formula like this

IF(
ISBLANK( FX_Rate_to_USD__c ),
Base_line_Billing_Rate_In_SOW_Currency__c * Base_Line_Hrs__c,
Base_line_Billing_Rate_In_SOW_Currency__c * Base_Line_Hrs__c * FX_Rate_to_USD__c
)

But it's not working, I need like this

if the FX rate is blank it multiplies only the Currency and Hrs..
else if FX rate is not blank, then it multiplies Currency, Hrs & FX rate ..

Thanks in adv.
I need to upload activities into CRM. But when I upload using dataloader,how would I disable task reminders?

When I create tasks and login to CRM, I get reminder pop up window on my screen. But I donot want to receive any reminders for the tasks records I upload.

I have thousands of records and I hate to see all the reminder pop up windows.

Is there any way we can disable for just that particular upload? I would like to enable it for all other direct entries through page layout.
  • May 19, 2014
  • Like
  • 0
I am trying to use a button with onclick javascript to pass today's date into an existing date field, but I get the error message "12/23/2013 is not a valid value for the type xsd:date".  What is the correct way to pass today's date?  My code is below.

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} /*call the ajax connection*/
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}

var currentDate= new Date();
var month = currentDate.getMonth() + 1;
var day = currentDate.getDate();
var year = currentDate.getFullYear();
var today = (month + "/" + day + "/" + year);

var requestFetchInstall= new sforce.SObject("P4_Contract__c"); /*Initialize a new
sobject to work with, this would need to be changed whatever custom object */
requestFetchInstall.Id = "{!P4_Contract__c.Id}"; /* set var to the record id we are working on */
requestFetchInstall.Fetch_Install_Requested__c =(today); /*set a custom field, you would have to rename it to yours, to the value desired, or any field you choose */
result = sforce.connection.update([requestFetchInstall]); /* update the record we initalized with the id *


window.location.reload(); /* reload the page */

May be you people will smile at me..but i am not able to do this programme

 

<apex:page controller="testdisplay">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection title="test" >
<apex:outputText value="{!display}" />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

 

public class testdisplay
{

public String display { get; set; }

public static string display()
{
return ('Hi viewers');
}
}

 

 

 

 

I am not getting the output as Hi viewers watz wrong with this programme

Hello, is it possible to remove the 'Reset password' button from the user layout?

 

I want override this button or remove him and create an other.

 

Thanks for the responses.

Hi,

 

I have a Trigger on Insert  which populates a field of Opportunity with Date.today().Time Zone of User and Company is CST.

In Test class assertion is written to check whether the field's value is Date.today() or not.

But the test class fails only for some time around 11:00 to 11:30 AM IST.

I have also put debug statement in test class and trigger to view the Date.today() and then I run the test class.But it shows wired behaviour .In test class Date.today() appears as date of the logged in user but in trigger around 11:00 to 11:25 AM IST  Date.today() is diplayed as the very next Day i.e. if it is 28 th Nov in CST then in trigger it displays 29 th Nov .The same test class works fine rest of the day.

 

Can someone help me.It creates issue since I cannot deploy changes to production in this time span.

  • November 29, 2013
  • Like
  • 0

When the chatter desktop is created there should be log out option which is not available in chatter desktop.

I think this is necessary for security purpose!

  • November 28, 2013
  • Like
  • 0
HI, If error occurs when inserting records from data loader to salesforce org. It will be inserting records partially or stops inserting.If it stops inserting, agian we will strat inserting records from starting. Thanks in advance...

it sounds so simple, get a list of similar items and allow the user to edit one field, then click save and return to where you came from. I just do not understand enough to make this happen, can some one take a look? When i hit save i get the page back but no updates have happened 

 

VF page 

 

<apex:page standardController="ERP_Data__c" extensions="opportunityList2Con">

    <apex:form >
        <apex:pageBlock title="{!erp.Chain__c}" >
            <apex:pageMessages />
            <apex:pageBlockButtons >
              <apex:commandButton value="Save" action="{!mysave}"/>
            </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!Opportunities}" var="o" >
                
                <apex:column value="{!o.Account__c}"/>
                
                <apex:column value="{!o.id}"/>
                
                <apex:column value="{!o.Acct_RT_Name__c}"/>
              
                <apex:column headerValue="Program">
                
                    <apex:inputField value="{!o.Program__c}"/>
                    
                </apex:column>
                
            </apex:pageBlockTable>      
        </apex:pageBlock>
    </apex:form>
    
</apex:page>

 and the controler

 

public class opportunityList2Con {
public opportunityList2Con(ApexPages.StandardController controller) {}

erp_data__c erp;
public erp_data__c geterp() {
if (erp == null){                      
erp = [SELECT Chain__c FROM ERP_Data__c WHERE 
    id = :ApexPages.currentPage().getParameters().get('id')];
      }
   return erp;

}

String myTestString = ApexPages.currentPage().getParameters().get('name') ;

// ApexPages.StandardSetController must be instantiated
// for standard list controllers
public ApexPages.StandardSetController seterp {
     get {
        if(seterp == null) {
           return new ApexPages.StandardSetController(
                     Database.getQueryLocator(
                [SELECT name, Account__c ,Acct_RT_Name__c, Chain__c, 
                        Id, Program__c, RecordTypeId    
                 FROM ERP_Data__c  
                 WHERE Chain__c = :myTestString limit 25 ]));
        }
        return seterp;
    }
   set;
 }
 
 
 
 
// Initialize seterp and return a list of records
public list<ERP_Data__c> getOpportunities()  
{
return (list<ERP_Data__c>) seterp.getRecords();
}
public PageReference mysave(){

    seterp.save();  //call the save method on your set controller
    //controller.save();  add this if you want to save your original ERP_Data__c record         
    //as well
    
    
return null;

}
}

 Most of this code I have picked up and modified from other people projects so my understanding  on why some things are here is low. Once i get it working i will spend the time to clean up the naming spacing and comments , thanks in advance!

Hi

 

I have no Apex training but have managed to piece this trigger together with help from these boards! Now i have my trigger in place I need to update all my leads to use it. However I get the  System.LimitException: Too many SOQL queries: 101 error when mass-updating leads.

 

I understand the concept that I'm calling too many SOQL queiers. Anyone willing to help re-code this trigger to bring teh SOQL out of the for loop?

 

trigger updateCCLookupField on Lead (before insert, before update) {

List<Lead> leads = new List<Lead>();

  for (Lead l : Trigger.new)
  { 
  Try
  {
     Campaign_Codes__c AssociatedCC = [SELECT Id FROM Campaign_Codes__c WHERE CodeOnCC__c= :l.Campaign_Code__c];
    l.CC_Lookup__c = AssociatedCC.Id;
  }
  Catch(Exception e)
  {
  l.CC_Lookup__c = null;
  } 
  }
}

hi group,

 

                 In E-Mail to Case what are the mandatory values to be passed . And can any one explain to me in detail about E-mail to Case, In the sense where to be used and why ...

       

     Thanks for giving reply in (advance)

                    Thanks and Regards

                            Varma