In Access, when I do a Database Tools->Database Documenter, and document an existing table, the report has a value called GUID. I want to get that GUID programatically.
I am trying to determine if 2 databases came from the same source, by comparing their GUID.
Points for either telling me the name of the function; alternately, you could tell me how to decompile the code that generates the report.
At least on Access 2010, the GUID value is in the "Properties" section of the Database Documenter report, so I tried this out in one of my databases:
CurrentDB.TableDefs("dateTest").Properties("GUID").Value
The return value is an Array of Bytes.
The value can be found in the system table called MySysNameMap
SELECT GUID FROM MySysNameMap WHERE Name = "Your TABLE NAME"
You can also use function such as DLookup in VBA to get the GUID from that system table.
Related
I am somewhat new to MS Access and I have inherited an application with a table that uses this Lookup feature to replace a code with a value from a query to another table.
When I first used this table and exported it to Excel for analysis, I somehow got the base ID number (or whatever it would be called) rather than the translated lookup value. Now, when I do this, I get the translated text. The biggest problem is that while the base value is unique, the translated values are not, so I cannot use them for the work I am doing.
Can someone explain how to get the underlying ID value rather than the lookup value? Is there some setting I can use or some way to reference the field upon which the lookup is based. When I query the ID field, I get the lookup value. I know that the first time I did this, the spreadsheet contained the ID number not the text.
For now, I created a copy of the table and removed the lookup information from this copy, but I know I did not run into this when I did this the first time.
Thanks.
When you export to Excel, leave Export data with formatting and layout unchecked. This will create a spreadsheet with raw data values in Lookup fields.
Export settings image
Can anyone help me for upserting the record in CRM11 using kingswaysoft crm connector ?
I have an excel sheet which contains employee number and other details, not any guid. I need to insert or update these data in CRM11.
Do we need guid to update the record. Can we not proceed for update without guid I mean based on employee number ? If yes then how to fetch the guid using employee number through CRM connector ?
Here need DEPARTMENT entity detail based on their name provided in excel sheet, basically need to LOOKUP. Is it possible to fetch other entities details like department through CRM connector instead of directly pointing to the sql database ?
We (I work for KingswaySoft) support manually specified fields to be used for Upsert operation. It is a relatively simple configuration. You basically choose Upsert as the action on the general page of the CRM destination component, then "Manually Specify" as the Upsert/Update matching criteria. After that, you would head to the Columns page to select the matching fields which become the Upsert key fields. In the case that you set up this type of manually Upsert, you don't need to worry about GUID (and you should not map the primary key field just to be safe). When the Upsert action happens, we actually first do a lookup of the key values based on the matching fields that you have selected, it would create a new record if no match is found and our component will return the newly created record's ID in the default output. If a match is found, we use the GUID value from the lookup operation to perform an Update.
If you have to perform the Upsert based on a field from a lookup (or related) entity, you would have to go a different approach (as suggested by our team above), you would be using an SSIS Merge Join component. The idea is, you use a CRM source component to read from CRM. The source component would be using a FetchXML query that reads from the target entity by joining with the lookup (or related) entity that you want to pull the key values. After the merge join component, you would know whether a match is found. If a match is not found, then you would send to a destination component to perform a Create action. Otherwise, if a match is found, you would send it to a destination component that performs the Update action. The merge join component would be doing a left join.
Hope this helps. Please feel free to let me know if there is anything else that we can help with.
have you taken a look at our Help Manual? You can find instructions for how to use our destination component to write data to a destination Microsoft Dynamics CRM server.
Our CRM destination component supports Upsert action, which would update any existing records in CRM if matching can be found, otherwise create a new record.
There are four matching options supported when the Update/Upsert action is selected: Primary Key, CRM Duplicate Detection, Manually Specify, Alternate Key.
You can use Manually Specify matching criteria if you do not know the GUID value and would like to perform Update/Upsert based on the employee number.
Our CRM toolkit uses CRM Web Services to communicate with CRM, we do not work directly with your SQL database.
To perform LookUp based on the name in Excel, you can use SSIS Merge component to find the Department details of the records in your excel sheet.
Hope this has helped, feel free to reach out to us if you have more questions.
Upsert doesn't exist in CRM 2011 so you'll need to do it manually in two operations:
Retrieve based on Employee number, then
If exists => Update, otherwise, Create
I'm attempting to import a csv file in Microsoft Dynamics 2011. The file is an export of sales data from our website and I'm attempting to create new Account, Contact, Invoice, Order, Invoice Product and Order Product entities using this data. I'm using a multi-entity data map to do this.
When I attempt the import however, creating the invoice fails with the message "The lookup reference could not be resolved." in connection with the currency field. This field is a lookup tied to currency name which in all cases is "US Dollar". This is exactly the same name as the USD currency in our database, but for some reason the lookup refuses to assign it correctly. There are no other currencies in our database with this name.
Can anyone offer me an explanation as to why this is happening and any steps I can take to deal with it? Many thanks.
EDIT: More information about my problem.
It seems that problems occur when I try and perform a multiple entity import with duplicates. All the new entries I'm creating from this import is dependent on other new entries created with the same data. I'm creating accounts, then creating customers to assign to those accounts for example. If said accounts have duplicates already in the system, they are ignored. This is expected. However, when it comes to create the customer assigned to that account, the lookup fails with a "Duplicate lookup reference was found" error. This error occurs when there are more than one things in the database that fit the value I'm using with the lookup.
I'm not 100% sure, but I think it's counting both the account that was ignored and the original account that's already in the system when performing the lookup. Can anyone offer more insight on how I might work around this?
I don't know for sure if this is your issue but my guess it is.
In the import wizard you can select how he resolves your lookups.
i.e: when in your CSV file the column contains the name of the currency you will have to select the name field in your import wizard for the currency field.
In the screen here you can see then country is a lookup and the name of the country is the value of CSV file. It must match the field of the lookup. If I select "created on" It doesnt find the lookup. because no country exists where created on equals "Belgium". So you select the Name field of the lookup and that is how he will check your value in the CSV in the lookup field you defined.
1.Put records for each record type in a separate file.
2.Put records for different owners in a separate file.
3.Ensure that the first line of the file contains column headers and that they match the CRM attribute display names EXACTLY if you would like the import wizard to automatically* map the data. *Automatic mapping is required if you intend to import records that are related to another record (See #6). I HIGHLY RECOMMEND USING AUTOMATIC MAPPING EVEN IF YOU DO NOT DESIRE RELATED RECORDS.
4.Make sure the first column heading is not the name of a record type.
5.Make sure data exists in your source file for all CRM required fields (denoted with a red asterisk on the CRM form).
6.Make sure some data exists for each column. If a column has no data delete the column.
7.If your data should be related to another record (i.e. Adding Contacts to existing Accounts) make sure the column header matched the CRM lookup attribute display name. If you have two different attributes in CRM with the same display name you will receive an error (EX. if you created a custom State picklist value to replace the text version and keep the display name the same "Address 1: State/Province"). Also make sure the company name values will match a corresponding account record (i.e. contacts with a Parent Customer value of Microsoft Corp. will not be added to the CRM Account Microsoft) and that there are no duplicate Accounts in the system as the import will not be able to resolve the proper Parent Customer.
8.If you are importing into a drop-down list, ensure all the values exist within CRM and there are no typographic errors and consistent capitalization in the source file.
EDIT: It seems like indeed there are multiple records in your DB that can fit in that 1 lookup. it's normal that he gives an error on this as he can't resolve the lookup. The CRM doesn't know which record to take.
Also you might want to watch out if you are importing a M-N Relationship. You will have to do a M-N Relationship with code. The standard import wizard cannot handle Many-to-many relationships
In access 2010:
I have the table "pharmacy" and I have a field called "ph_quantity".
I also have the table "warehouse" and I have a field called "wh_quantity".
In "warehouse" I also have a field called "available_stock".
Whenever I will change "ph_quantity" or "wh_quantity", I want to automatically update the value of "available_stock".
Any help please?
There are two new features in MS Access 2010 that should be of use to you.
In Access 2010, you can create table fields that calculate values. The
calculations can include values from fields in the same table as well
as built-in Access functions.
-- http://office.microsoft.com/en-us/access-help/add-a-calculated-field-to-a-table-HA101820564.aspx
Attaching Logic to Data Using Data Macros in Access 2010 Applications
I am trying to convert one of our most simple reports to Reporting Services.
The original excel report calls several stored procedures using the results of one to structure the next as it drills down through the data.
I currently have 2 datasets both of which call stored procedures.
The first is called GetGlobalCustomers. This populates a resultset which returns the connection info for each database (we have split our database per customer) and returns the fields ID, Name, Customer and Server.
The second is called GetSchedules which needs the Server and Name provided by GetGlobalCustomers to query the correct database.
However I only want to select the Customer by name, not the individual server/name (remembering which customer is on which server and what their database name is nigh impossible).
So I have a parameter called CustomerName, pushed to the top of the parameters list which presents the user the Customer to select first with the value being the ID. I also have two parameters called DBServer and DBName. How do I set DBServer and DBName to be dependent on the Customer selected? There doesn't appear to be a readily apparent means.
I am guessing that it needs to be part of Available Values and Specify Values but I can't figure out how to say "For this customer ID use this database/Name". I think I could by creating two extra datasets which perform a select by id queries for dbserver/dbname, but if I need to do that each time I want to select by parameter I will have dozens of datasets.
You can do that though your datasource with one caveat: you cannot use shared data sources.
The data source connection string can contain parameters in this case. For example:
="Data Source="+ Parameters!P_Environment.Value + ";Initial Catalog=MyDB;"
You are correct in saying that it needs to be part of available values. One possibility is to make the customer reference the full connection string which would be passed to the datasource. So in this case you would have one parameter which presents the customer name as the parameter text and the connection string as value.