I'm importing Activites from Goldmine to SalesForce using Starfish
The goldmine data has the date split into date and time using the fields
ONDATE and ONTIME
Salesforce needs the data to be in a single date field.
I'm trying to use a Function that will combine these into a single date so I tried using:
ScriptedField= cdate("@@ORG:ONDATE@@" + "@@ORG:ONDATE@@")
But that fails the Check.
In fact if I just use:
That fails as well, both of the above give the error:
Starfish Script Error: Type mismatch: 'cdate'
Can I not use the CDate vbscript function with Starfish?
Yes, you can use the CDate function, however when you use the Check box, it does not resolve variables.. so it's trying to convert date on text, which will cause that error. By the next version of Starfish, I'll like to improve that so the variables are resolved when you test the script.
Also, note sometimes in goldmine the date is populated but the time field is not. So it may be necessary to use IsDate on the Date+Time concatenation, if that fails - use Date only.
Thanks for the suggestions. So given your comments above, would you say the following function would be correct for importing from Goldmine?
If IsDate(CDate("@@ORG:ONDATE@@" + "@@ORG:ONTIME@@")) Then
ScriptedField=CDate("@@ORG:ONDATE@@" + "@@ORG:ONTIME@@")
Yes that looks good to me, though I would probably take that one step further and double check the Date Only to be IsDate too. Salesforce is picky about date formats.
Login or sign up for our forums to connect to the user community.
You must log in to post.
Not a Member? Register.