-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
6Questions
-
8Replies
Data Loader has error when export the User whose lastlogindate blank
I am trying to export the User from SFDC to Sql Server database, I create the process-conf.xml, database-conf.xml and sdl file. All the thing looks fine. But when I run the command line to export the user record, it gives me the error:
--------------------------------------------------------------------------------------------------
2012-08-23 18:40:04,163 INFO [userExport] controller.Controller executeAction (Controller.java:119) - executing operation: extract
2012-08-23 18:40:04,163 INFO [userExport] action.AbstractAction execute (AbstractAction.java:115) - Loading: extract
2012-08-23 18:40:05,033 ERROR [userExport] database.DatabaseWriter writeRowList (DatabaseWriter.java:165) - Database error encountered while preparing row #2
r writing row #1 through row #11. Database configuration: insertUser. Error: Type not supported: java.sql.TimeStamp.
java.lang.UnsupportedOperationException: Type not supported: java.sql.TimeStamp
at com.salesforce.dataloader.dao.database.DatabaseContext.getSqlType(DatabaseContext.java:219)
at com.salesforce.dataloader.dao.database.DatabaseContext.setSqlParamValues(DatabaseContext.java:190)
at com.salesforce.dataloader.dao.database.DatabaseWriter.writeRowList(DatabaseWriter.java:144)
--------------------------------------------------------------------------------------------------
After some research I find the root cause is that the user's LastLoginDate is null. Data loader may works as below:
1. the dataloader will query the SFDC User object, and retieve the records per the soql in process-conf.xml.
2. the Dataloader Jar package will mapping the data from SDFC to the Sql Server table per the sdl file
3. After Data loader does the mapping, it will do the data type conversion per database-conf.xml and insert the data into SQL Server. the following statement used for the datatype conversion:
<entry key="LastLoginDate" value="java.sql.TimeStamp"/>
If the soql in step 1 query one user record with the LastLoginDate = null, then in Step 3, the jar package can't convert null to java.sql.TimeStamp. So the error is raised. that means if the user's LastLoginDate = null, it will break the process.
I have test it by filter the user records which LastLoginDate <> null. all the users can be exported if his LastLoginDate <> null.
Did anyone face the similar issue beofre? How can I export the user with the LastLoginDate == null?
I know there is a workaround, firstly, to export the user's whose LastLoginDate <> null; secondly, export those LastLoginDate == null but exclude the LastLoginDate from the soql..... But it is hard for me to maintenance.
-
- john he
- August 23, 2012
- Like
- 0
- Continue reading or reply
approve via the mobile app
hi,
I am a newbie on the mobile application development. what I want is to develop an App on iphone to let our business man approve the approval process.
Firstly, the app will display a list of "item to approve" on the screen, and there is a button let say "approve" on each of the item. Secondly, when the uer click the button, then he can approve it.
the challenge is that all the information is read from sfdc via the api (enterprise wsdl) also, the opperation is based on the api. but as sfdc says, if you access sfdc via the third part application, you have to provide the token... it is not possible for the business man to record the security token when he login sfdc via the App.
how much I am wrong on this? could anyone help?
thanks!
-
- john he
- July 12, 2012
- Like
- 0
- Continue reading or reply
Import Javascript in the Visualforce page
we have two approaches to import/refer the javascript in the visualforce page:
approach 1:
<apex:includeScript value="{!$Resource.MyJavascriptFile}"/>
approach 2
<script src="https://cs5.salesforce.com/resource/1331877511000/MyJavascriptFile"></script>
the appoach 1 is using the OOTB Visalforce component, and it is recommanded by SFDC
the approach 2 has the hard code issue when migrating the vf page from one ENV to another
the approach 1 put the javascript reference in the HTML head
the approach 2 put the javascript reference in the HTML body
Beside the above two differencies, are there any other differencies between these two approaches when import js in VF page?
the reason I asked this question is that I create a vf page and refer the js via approach 2. but when I am trying to using approach 1 to fix the hard code issue, the js does not work as expected.....
thanks!
-
- john he
- July 09, 2012
- Like
- 0
- Continue reading or reply
Default value BR() of the Text Area Field is converted to _BR_ENCODED_ by Apex:inputField
I am developing the visualforce page for user to edit the record. but I found that the BR() is converted to _BR_ENCODED_, which is absolutely not what I want.
here is the example to mimic the issue:
1. create a object let's say MyObject
2. add one field "short description" type = Text Area
3. set the default value for the field as following:
a. Monday
b. Sunday
c. Saturday
the formalu is like this: "a. Monday" & BR() & "b. Sunday" & BR() & "c. Saturday"
if you check the short description field on the salesforce standard page, it looks good.
but if you create a VF page to edit this field:
<apex:page standardController="MyObject__c">
<apex:form >
<apex:pageblock >
<apex:pageblockSection >
<apex:pageblockSectionItem >
<apex:outputLabel value="{!$ObjectType.MyObject__c.Fields.short_description__c.Label}"/>
<apex:inputField value="{!MyObject__c.short_description__c}"/>
</apex:pageblockSectionItem>
</apex:pageblockSection>
</apex:pageblock>
</apex:form>
</apex:page>
the BR() is converted into _BR_ENCODED_ and the whole default string is:
a. Monday_BR_ENCODED_b. Sunday_BR_ENCODED_c. Saturday
terrible!
Could anyone help in this? thanks!
John He
-
- john he
- May 26, 2012
- Like
- 0
- Continue reading or reply
Enable the drag-and-drop scheduling on Visualforce page
SFDC provides the cool feature (drag-and-drop scheduling) to let the user create event from the standard account list view by just drag-and-drop account on to the calendar. All the thing can be done via several mouse clicks. Our customers like it very much.
But the standard function is not so perfect:
1. the account list and the calendar are displayed vertically (account list on the top, calendar on the bottom) . But our sales are using the 12 inch laptop, the screen is too small to use this feature. Any thought?
2. we create the visualforce page for our sales, but we did not found a way to embed this feature on the visualforce page. Any Idea?
here is the screenshot for the drag-and-drop scheduling:
Interesting, the screenshot can't be displayed. here is the link:
https://docs.google.com/open?id=0B9iU2vIuD6f5QmxOSnBhOWFwRFk
sorry for the inconvenience.
-
- john he
- May 10, 2012
- Like
- 0
- Continue reading or reply
the session binding on Visualforce page
Sorry, I a new people on Visualforce page development.
when I develop visualforce page, I am confusing by the session binding syntax.
in the "AJAX Tookit Developer's Guide" book, I find an example on page 6, it puts the following code on the VF page:
<script type="text/javascript">
var __sfdcSessionId = '{!GETSESSIONID()}';
</script>
I believe, the above code is used to do the session binding.
But on the other hand, I find some VF page are use the following code to do the session binding:
sforce.connection.sessionId = "{!$Api.Session_ID}";
what is the different between the first approach and the second one? could someone help on this? many thanks!
-
- john he
- April 22, 2012
- Like
- 0
- Continue reading or reply
approve via the mobile app
hi,
I am a newbie on the mobile application development. what I want is to develop an App on iphone to let our business man approve the approval process.
Firstly, the app will display a list of "item to approve" on the screen, and there is a button let say "approve" on each of the item. Secondly, when the uer click the button, then he can approve it.
the challenge is that all the information is read from sfdc via the api (enterprise wsdl) also, the opperation is based on the api. but as sfdc says, if you access sfdc via the third part application, you have to provide the token... it is not possible for the business man to record the security token when he login sfdc via the App.
how much I am wrong on this? could anyone help?
thanks!
- john he
- July 12, 2012
- Like
- 0
- Continue reading or reply
Default value BR() of the Text Area Field is converted to _BR_ENCODED_ by Apex:inputField
I am developing the visualforce page for user to edit the record. but I found that the BR() is converted to _BR_ENCODED_, which is absolutely not what I want.
here is the example to mimic the issue:
1. create a object let's say MyObject
2. add one field "short description" type = Text Area
3. set the default value for the field as following:
a. Monday
b. Sunday
c. Saturday
the formalu is like this: "a. Monday" & BR() & "b. Sunday" & BR() & "c. Saturday"
if you check the short description field on the salesforce standard page, it looks good.
but if you create a VF page to edit this field:
<apex:page standardController="MyObject__c">
<apex:form >
<apex:pageblock >
<apex:pageblockSection >
<apex:pageblockSectionItem >
<apex:outputLabel value="{!$ObjectType.MyObject__c.Fields.short_description__c.Label}"/>
<apex:inputField value="{!MyObject__c.short_description__c}"/>
</apex:pageblockSectionItem>
</apex:pageblockSection>
</apex:pageblock>
</apex:form>
</apex:page>
the BR() is converted into _BR_ENCODED_ and the whole default string is:
a. Monday_BR_ENCODED_b. Sunday_BR_ENCODED_c. Saturday
terrible!
Could anyone help in this? thanks!
John He
- john he
- May 26, 2012
- Like
- 0
- Continue reading or reply
the session binding on Visualforce page
Sorry, I a new people on Visualforce page development.
when I develop visualforce page, I am confusing by the session binding syntax.
in the "AJAX Tookit Developer's Guide" book, I find an example on page 6, it puts the following code on the VF page:
<script type="text/javascript">
var __sfdcSessionId = '{!GETSESSIONID()}';
</script>
I believe, the above code is used to do the session binding.
But on the other hand, I find some VF page are use the following code to do the session binding:
sforce.connection.sessionId = "{!$Api.Session_ID}";
what is the different between the first approach and the second one? could someone help on this? many thanks!
- john he
- April 22, 2012
- Like
- 0
- Continue reading or reply
Access standard CSS of standard page layout
I want to change the look and feel of salesforce pages. That mean, I want to use standard page layout but want to change the CSS of that standard page layout. But I couldn't find a way to access CSS for editing.
If anyone aware with this kind of problem, please help.
- Chamil Madusanka
- May 04, 2011
- Like
- 0
- Continue reading or reply
Identify current step of Approval process in trigger
I am trying to piggy-back some functionality onto an Approval Process step. For example if the Related User for step 2 (ProcessInstanceWorkitem.ActorId?) is set to a certain user then i want to perform an additional function in the background. But only when that step is active. I can use the ProcessInstance table to find the ProcessInstanceId which i can then use to find the WorkItem whose ActorId field shows me the related user but I don't know what step in the approval process I am in. Is it step 2 or any other step?
How can I find what step of the approval process a record is in?
- JesseA
- January 05, 2011
- Like
- 0
- Continue reading or reply
MIXED_DML_OPERATION, DML operation on setup object is not permitted Error
I'm trying to copy a new user as contact by using a trigger but I'm getting the following error
MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): Contact, original object: User
trigger Acceleration_User_Copyto_Contact on User (after insert, after update) { // Map<String,User> newLead = new Map <String, User>(); system.debug('Acceleration_User_Copyto_Contact Trigger....'); for ( User user : System.Trigger.new) { if (user.Email.contains('acceleration')) { system.debug('Acceleration_User_Copyto_Contact Trigger..2.'); Integer RecordCount = [select count() from Contact c where c.Email = : user.Email]; system.debug('Acceleration_User_Copyto_Contact Trigger..2a .' + RecordCount); if (RecordCount == 0) { String AccountId = ''; for ( Account a : [Select a.Id From Account a where Name = 'Acceleration']) { system.debug('Acceleration_User_Copyto_Contact Trigger..3.'); AccountId = a.Id; Contact con = New Contact(); con.AccountId = AccountId ; con.Email = user.Email; con.Firstname = User.Firstname; con.Lastname = User.Lastname ; con.User__c = User.Id; insert con; } } } } }
- Tracey
- June 29, 2009
- Like
- 1
- Continue reading or reply
How to make a Date formula field which will add Months?
I have a formula field named Contract End Date and the value of this field should be calucated based on Contract Start Date and the Contract Duration. Contract Start Date is of type Date and Contract Duration is the number of months. Id I just add both the fields it considers Contract Duration as number of days instead of month. How do I achieve this?
Thanks
Jina
- Jina Chetia
- July 16, 2008
- Like
- 1
- Continue reading or reply