Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8060407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:58:59+00:00 2026-06-05T09:58:59+00:00

I need to push changes from a SQL server database to CRM. There are

  • 0

I need to push changes from a SQL server database to CRM. There are two tables on the SQL side:

Transfer

  • TransferID (sequential)
  • Entity (string, the SQL table name)
  • PKOfEntity (int, also from the table)
  • Action (create, update, destroy)

TransferField

  • FieldID (sequential)
  • TransferID (foreign key)
  • FieldName (string)
  • FieldValue (string)

Now, I need to get these changes into the CRM. I have a mapping of SQL tables to CRM entities, and one of SQL columns to CRM attributes. I do not, however, have a mapping of CRM attributes to CRM types on hand.

I’m using the Microsoft.Xrm.Sdk.Client.OrganizationServiceContext object. Its SetAttributeValue method takes an object, but it doesn’t do any conversions; an int field requires passing in an int, and so on. Now, I would really, really, really like to just be able to pass in the field names and values dynamically as strings in one simple foreach, rather than manually checking for and setting dozens of attributes for dozens of models. Is there a reasonable way of doing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:59:01+00:00Added an answer on June 5, 2026 at 9:59 am

    I have it working. For each type of entity I come across, I get the entity metadata from the CRM, and then build a Dictionary from attribute names to AttributeTypeCodes. I have a function that switches on the type code and returns the correct type of object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Problem I need to push changes from an SVN server to a remote
I'm writing web application where I need to push data from server to the
I'm new to git. I need to use public key to push changes from
Here is something I need to accomplish: WPF datagrid display/bind data from SQL through
I'm using the Database Publishing Wizard in VS2008 to push changes to my hosting
I have the need to access a sybase database (12.5) from oversea. The high
I'm evaluating several Comet servers because I need HTTP Push in a new project
Within my code, I need to push an int onto Lua's stack. I know
This is homework, so I don't want the answer. I only need a push
OSX 10.7, XCode 4. I have a small problem: I need to push back

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.