Need to upload new data to dynamics 365

  • 22Views
  • Last Post 3 days ago
0
votes
Andy Le posted this 2 weeks ago

I'm trying to accomplish two things:

1. Upload new accounts into dynamics, if it doesn't exist, add it. If it does exist, only update a field like invoice date.

2. Import list into dynamics that would update a date field.

What is the best way to do this?

Order By: Standard | Newest | Votes
0
votes
Mariia Zaharova posted this 2 weeks ago

1. Upload new accounts into dynamics, if it doesn't exist, add it. If it does exist, only update a field like invoice date.

 

Did you look at the Import package with the UPSERT operation? The UPSERT operation updates a record if it exists or inserts a new record. This allows you to avoid inserting duplicate data. You need to map the target ID/Primary key columns for performing UPSERT.

In Skyvia, UPSERT determines what action to perform in the following way: if a Null value is specified for the ID or primary key, UPSERT operation inserts the record, and if a non-null value is specified, UPSERT operation tries to update the record with the specified ID or primary key. 

JIC: When using lookup mapping for ID or PK columns in UPSERT, don't forget to select the Set null when no match found check box in Lookup Options. Otherwise, lookup will produce errors if no such record found, and there would be failed records instead of inserted new ones.

See: https://skyvia.com/resources/docs/index.html?performing_upsert_operation.htm

 

2. Import list into dynamics that would update a date field.

 

Could you please clarify this case in more details? Do you mean List entity?

 

Looking forward to your reply.

0
votes
Andy Le posted this 2 weeks ago

Thanks, I found those documentation after the post.

0
votes
Andy Le posted this 2 weeks ago

I'm trying to insert a record into dynamics 365 from excel sheet. I'm looking into issue where the forms on dynamics 365 have sales rep and owner. Both of these field show the same data.

On the excel sheet that I'm importing, it has sales rep field and owner name field, but not ownerID. I'm able to map the sales rep field, but the owner id, I'm running into an issue. There's no correct mapping so I have to do a target lookup. How do I map ownerid to a field in excel that only have the owner name?

I'm doing an upsert and target account and trying to map this field and not having any luck. I don't have ownerid in my excel sheet.

 

edit: I've added screenshots for reference.

0
votes
Mariia Zaharova posted this 2 weeks ago

If you remove the mapping for this column in the task, the necessary OwnerId will be inserted automatically based on the used Dynamics CRM connection. 

Also, you can query all possible OwnerIds via Query Tool  (SELECT "OwnerId", "Name" FROM "owner") and use the necessary value in import as Constant value.

 

If you have Owner Name in your source CSV file (OWNER), you can try using the Lookup mapping, for example, like this:

 

Please take a look at Skyvia docs:

https://skyvia.com/resources/docs/index.html?mapping.htm

 

Please tell us if this helps.

0
votes
Andy Le posted this 2 weeks ago

I did look at that documentaiton and try it about 20 times yesterday and kept getting this error.

Hopefully you can clarify the error for me:

No record found in object 'owner' for lookup by column 'name

 

If I check Set null when no match found Attribute: ownerid cannot be set to NULL";"455f0e07-ebe1-e811-a865-000d3a140f13

0
votes
Mariia Zaharova posted this 2 weeks ago

No record found in object 'owner' for lookup by column 'name

This error means that there is no record in your Dynamics CRM Owner table with the name equals to the value stored in your CSV file (Owner column).

The OwnerId (Owner) is related to your Dynamics CRM organization. You can query all possible OwnerIds via Query Tool (SELECT "OwnerId", "Name" FROM "owner") and check whether you have correct values in CSV file.

This lookup produces this query:

select Owner.OwnerId where

Owner.name = (–°olumn = Owner)

 

Thus, please make sure that you have names in your Owner column (CSV) that correspond to Dynamics CRM Owner names. Try using the necessary OwnerId value in import as Constant value or just do not map this field (it is not required, value will be automatically assigned on Dynamics CRM side).

0
votes
Andy Le posted this 4 days ago

I'm trying to import new accounts. However, I'm not sure if they're already in dynamics.

Should I use insert, upsert? I would like to update only if account exist and only insert if account doesn't exist.

Is that possible? Right now, if I use upsert, it creates a duplicate account in dynamics.

0
votes
Mariia Zaharova posted this 3 days ago

 Should I use insert, upsert? I would like to update only if account exist and only insert if account doesn't exist.

 

For this scenario UPSERT must be used. This operation updates a record if it exists or inserts a new record.

 

Is that possible? Right now, if I use upsert, it creates a duplicate account in dynamics.

 

Yes, it is possible to implement this via UPSERT. Duplicate records are created most likely because of this: Lookup mapping for Id field does not return the necessary record for update. In case when record is not found and "Set null when no match found check box" option is selected (required for UPSERT), the record is inserted. Thus, please check your Lookup mapping (for taget Id field). If necessary, add some additional lookup key columns. You need to have a column or a set of columns that uniquely identifies a record.

Close