Answered by:
XML file data import

Question
-
Using CRM 3.0.
I have created a bunch of custom attributes for products with certain product specific information, and an external application can save all the information we need in CRM to an XML file.
How can I have a button on the form that will allow the user to browse to find the file, then automatically import the data stored in the XML file to the relevant attributes?
Would this be possible using an OnChange event for a tick box also?
So for instance, a bit attribute with name Import Data (yes/No).
If the box is ticked an event is fired that opens a browse window to find the file etc etc
Tuesday, January 12, 2010 3:46 PM
Answers
-
Hi Martin,In addition to JavaScript, I believed it will be easier to create a custom page, so when you click on the import button, it shows those files in your custom page. From there, you can do all the things that you like to do through the CRM SDK. This way you have more control. I don't think you can do it all just by using JavaScript.I hope this helps.
Darren Liu | 刘嘉鸿 | MS CRM MVP | English Blog: http://msdynamicscrm-e.blogspot.com | Chinese Blog: http://liudarren.spaces.live.com- Marked as answer by Jim Glass Jr Tuesday, January 12, 2010 8:32 PM
Tuesday, January 12, 2010 5:55 PMModerator
All replies
-
Martin3T,
You will need JScript to fire a call out to do the import which can be tied to the onChange event. The call out will use the sdk to import the data.
Here is a posting on how to add a button to a form: http://www.crowehorwath.com/cs/blogs/crm/archive/2008/03/16/adding-a-button-to-crm.aspx
Jerry
http://www.crmInnovation.com
JerryTuesday, January 12, 2010 4:30 PM -
Hi Jerry,
thanks for the reply, but I already know I probably need a JScript to do this, but what I have no idea about is what the JScript should look like.
I'm sure that this is a common enough requirement and that someone must have the code example already, only trouble is where to find it.
As for the posting on adding a button; steps 1. and 2. are clear enough, but step 3. makes absolutely no sense whatsoever since the code he's referring too in 3a. and 3b. seems to have disappeared!
Cheers
MartinTuesday, January 12, 2010 5:19 PM -
Martin,
Here is one possibility http://crmentropy.blogspot.com/2009/12/fire-event-on-any-crm-field-change.html
Also take a look at Scripting Sample Code in the SDK http://msdn.microsoft.com/en-us/library/cc150864.aspx
Jerry
http://www.crmInnovation.com
JerryTuesday, January 12, 2010 5:44 PM -
Hi Martin,In addition to JavaScript, I believed it will be easier to create a custom page, so when you click on the import button, it shows those files in your custom page. From there, you can do all the things that you like to do through the CRM SDK. This way you have more control. I don't think you can do it all just by using JavaScript.I hope this helps.
Darren Liu | 刘嘉鸿 | MS CRM MVP | English Blog: http://msdynamicscrm-e.blogspot.com | Chinese Blog: http://liudarren.spaces.live.com- Marked as answer by Jim Glass Jr Tuesday, January 12, 2010 8:32 PM
Tuesday, January 12, 2010 5:55 PMModerator