-
ChatterFeed
-
6Best Answers
-
1Likes Received
-
0Likes Given
-
9Questions
-
44Replies
Data loader issue
- Madhu007
- November 07, 2013
- Like
- 0
- Continue reading or reply
Struggling with Apex Data Loader Command Line Password
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.
<!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.
- Geetha Reddy
- August 28, 2012
- Like
- 0
- Continue reading or reply
Issue setting created by field using a trigger
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?
- Max_g
- June 12, 2012
- Like
- 0
- Continue reading or reply
How To Determine And Display Correct Field Type In Dynamically Rendering A Form?
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!
- SalesRed
- April 27, 2012
- Like
- 0
- Continue reading or reply
Manually Expire a password
HI,
Is there any way that I can set expiration password date for any user or profile?
Thanks
- alibzafar
- July 16, 2012
- Like
- 0
- Continue reading or reply
FeedItem query
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
- alibzafar
- July 16, 2012
- Like
- 0
- Continue reading or reply
ContentType in FeedComment
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
- alibzafar
- June 11, 2012
- Like
- 0
- Continue reading or reply
Missing Organization Feature: Campaign
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
- alibzafar
- June 08, 2012
- Like
- 1
- Continue reading or reply
Looping through a Map
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
- alibzafar
- May 01, 2012
- Like
- 0
- Continue reading or reply
Throw an exception Error
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
- alibzafar
- April 26, 2012
- Like
- 0
- Continue reading or reply
API Limit Exceeded - PE
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?
- alibzafar
- December 20, 2011
- Like
- 0
- Continue reading or reply
Building .Net Listener for Salesforce Outbound message
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
- alibzafar
- December 07, 2011
- Like
- 0
- Continue reading or reply
Outbound message to Invoke .Net Application
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
- alibzafar
- December 02, 2011
- Like
- 0
- Continue reading or reply
Missing Organization Feature: Campaign
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
- alibzafar
- June 08, 2012
- Like
- 1
- Continue reading or reply
I want to show all the names from a related list object added in account object field.
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 ?
- rv90
- August 15, 2017
- Like
- 0
- Continue reading or reply
select checboxes
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!
- Alex Sh
- August 15, 2017
- Like
- 0
- Continue reading or reply
Create Task on Case object
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
- salesforce User 15
- September 11, 2014
- Like
- 0
- Continue reading or reply
How do I unit test a @future method that makes a callout?
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 skippedSo the question is, how do I unit test a @future method that makes an callout?
- Stuart Grimshaw
- September 05, 2014
- Like
- 0
- Continue reading or reply
where the activity custom fields are stored?
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
- Manza
- July 30, 2014
- Like
- 0
- Continue reading or reply
Questions on Creating Record from Opportunity
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.
- Squire Kershner
- May 19, 2014
- Like
- 0
- Continue reading or reply
Formula field using display value
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.
- kumar.fdc81.3902978579608325E12
- May 19, 2014
- Like
- 0
- Continue reading or reply
Task Reminders - How to disable?
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.
- Nehaa
- May 19, 2014
- Like
- 0
- Continue reading or reply
pass today's date to a field in a button
{!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 */
- Shamrock Snowman
- December 23, 2013
- Like
- 0
- Continue reading or reply
simple output
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
- vamshi(Nani)
- December 03, 2013
- Like
- 0
- Continue reading or reply
Disable Reset Password from the user layout
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.
- Aurélien.Laval
- December 03, 2013
- Like
- 0
- Continue reading or reply
TimeZone issue in Test Class
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.
- pbis
- November 29, 2013
- Like
- 0
- Continue reading or reply
Log Out Option is mandatory
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!
- Reks
- November 28, 2013
- Like
- 0
- Continue reading or reply
Data loader issue
- Madhu007
- November 07, 2013
- Like
- 0
- Continue reading or reply
Display a list, make an edit and then save
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!
- MrHammy
- November 06, 2013
- Like
- 0
- Continue reading or reply
Help with trigger (System.LimitException: Too many SOQL queries: 101)
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;
}
}
}
- AntonyWarc
- August 14, 2013
- Like
- 0
- Continue reading or reply
E-Mail to Case
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
- varma 116
- March 25, 2013
- Like
- 0
- Continue reading or reply