Question Status

Verified
nicole0708 asked a question on 16 Feb 2015 11:23 AM

 I am trying to insert multiple rows into table  orbus_competitor_accountBase. (relationship between competitors and accounts was created.

I have the competitor id and accountid that i would like to insert. How do I generate the orbus_competitor_accountid field. See attached

 

Reply
Suggested Answer
Mahadeo Matre responded on 16 Feb 2015 11:41 AM

Hi Nicole,

It is not supported to insert record directly into CRM SQL Database.

but even if you want orbus_competitor_accountid id for SQL, you can use

insert into orbus_competitor_accountBase (orbus_competitor_accountid, competitorid, accountId) values (new Guid(), competitorid, accountId)

 

you can New Guid()  to generate orbus_competitor_accountid.

but again this GUID is not sequential GUID, so it might create some issue in performance. 

Another option would be you can create one small console application and using CRM SDK you can easily insert multiple  rows / create multiple relationships. 

Hope this will help.. 

 

 

Reply
Verified Answer
Guido Preite responded on 16 Feb 2015 11:44 AM

as Mahadeo Matre wrote:

It is not supported to insert record directly into CRM SQL Database

then STOP, suggesting unsupported customizations when there are supported ways (creating record using CRM web services) is a bad practice and more important a BAD suggestion.

Reply
Verified Answer
Guido Preite responded on 16 Feb 2015 11:44 AM

as Mahadeo Matre wrote:

It is not supported to insert record directly into CRM SQL Database

then STOP, suggesting unsupported customizations when there are supported ways (creating record using CRM web services) is a bad practice and more important a BAD suggestion.

Reply
Suggested Answer
Mahadeo Matre responded on 16 Feb 2015 11:41 AM

Hi Nicole,

It is not supported to insert record directly into CRM SQL Database.

but even if you want orbus_competitor_accountid id for SQL, you can use

insert into orbus_competitor_accountBase (orbus_competitor_accountid, competitorid, accountId) values (new Guid(), competitorid, accountId)

 

you can New Guid()  to generate orbus_competitor_accountid.

but again this GUID is not sequential GUID, so it might create some issue in performance. 

Another option would be you can create one small console application and using CRM SDK you can easily insert multiple  rows / create multiple relationships. 

Hope this will help.. 

 

 

Reply