Skip to main content

Posts

Showing posts with the label field

table & field ID conflicts

Some months ago, I posted an article about SQLDictionary ID conflicts. It was a x++ job that scans and solves at once. Last month I have to do this in a use live environment. The customer preferred detailed information about the ID conflicts and solving it was the next step. The keyword in this process is: Don’t lose customer data on the Database! Let’s look at next example Tablename AOT ID SQL ID A 50003 40001 B 40025 40013 C 40026 40025 So I created a script that checks: Difference in Table ID Difference in Field ID Difference in String size Changed field properties Check if documents in document management are attached to tables with an ID conflict. (or amy other table). From the results I created small jobs that solved the ID conflicts on a structural way. Solve any difference in the field Properties In your AOT (string size, Created date, etc) Solve the Table ID conflicts Process the tables in an order that the change to a non existing ID in th...

Getting a value from a field if you only know the field ID

static void Job4 ( Args _args ) { CustTable custTable; FieldId fieldId; ; fieldId = fieldNum ( CustTable , AccountNum ) ; // This could be passed as a method parameter select custTable; // Get first record print custTable. ( fieldId ) ; // Print account number select custTable where custTable. ( fieldId ) == '1101' ; // Where clause based on field ID print custTable. Name ; pause ; }