web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

running update SQL query on database

(0) ShareShare
ReportReport
Posted on by

Hi

i have a requirement to append a custom field value in a custom entity to another field within the same entity.

the records are in thousands and i cannot run this using api. given i am only updating custom field of a custom entity

that too within same entity: is it ok to run a weekly over night schedule task to do this in SQL code?

any help is appreciated.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at

    Hi Likki,

    You can do it, but consider SQL Server Integration Services (SSIS), Workflows, and C# Console Applications as alternative options.

  • Community Member Profile Picture
    on at

    hi Adrian could you tell about console application way to achieve this? I am thinking a console application to open SQL connection and execute a stored procedure? is this what you mean by console app?

    any help is much appreciated.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Likki ,

    Please refer below old thread where I have shared how to write console and schedule the job in windows scheduler.

    community.dynamics.com/.../273478

    Hope this helps.

  • Community Member Profile Picture
    on at

    Hi Gautam

    the entity has 55000 items and would like to do with SQL stored procedure. any implications if i choose this path?

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Likki ,

    Doing any operation directly  in CRM Database is not a good practice  , so I would prefer to build console and using pagination retrieve more than 5000 records .

    You can check below reference how to retrieve more than 5k records .

    msdn.microsoft.com/.../gg328046.aspx

    docs.microsoft.com/.../page-large-result-sets-with-fetchxml

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans