You need to sign in to do that
Don't have an account?
vivek.kumar.ax1255
SalesForce Opportunity Field inset Error
I am integrating with salesforce through java there in Opportunity there is a field named CloseDate . my code for the same is opportunitySObject.setField("CloseDate", "2010-01-01"); but i getmessage='Close Date: value not of required type: 2010-01-01' statusCode='INVALID_TYPE_ON_FIELD_IN_RECORD'
what i see by quering the database is CloseDate in 2010-01-01 format i.e. yyyy-MM-dd.
Please help.
You need to change the line opportunitySObject.setField("CloseDate", "2010-01-01")
Instead of passing String for the date you need to pass an object of java.util.Calendar type.
java.util.GregorianCalendar myCloseDate = new GregorianCalendar();
myCloseDate.set(2001, (01 -1), 01);
opportunitySObject.setField("CloseDate", myCloseDate);
Thanks and Regards,
DInesh Nasipuri
Dinesh.Nasipuri@gmail.com