Using the compare tool during an object import in Dynamics AX 2009 - dynamics-ax-2009

I'm trying to import a list of objects into a Dynamics AX 2009 system. The problem that I have is that the object IDs differ for all the objects that I'm importing. I'm doing the import manually, and so as part of this I need to compare each object (and there's a few), because they all show as different.
My question is: is there a way to either tell Dynamics to not show the object ID as a difference, or else to fool it into thinking they're the same?

Depending on your scenario, you could export the project from the source without using IDs. When importing the project to another system, there will not be ID conflicts (obviously).
But before you decide whether or not to export without ID, you should understand the pro's and con's of ignoring the IDs.

There is no option to ignore object ids.
However, you could make a code change in \Classes\SysTreeNode\comparableTextListProperties and delete the offending id property.

.XPOs are text files, so you can use a text editor and do a find and replace of object ids outside of AX before trying to import it.

Related

Possible to set file name for h2o.save_model() (rather then simply use the model_id value)?

Trying to save an h2o model with some specific name that differs from the model's model_id field, but trying something like...
h2o.save_model(model=model,
path='/some/path/then/filename',
force=False)
just creates a dir/file structure like
some
|__path
|__then
|__filename
|__<model_id>
as opposed to
some
|__path
|__then
|__filename
Is this possible to do from the save_model method?
I can't / hesitate to simply change the model_id before calling the save method because the model names have timestamps appended to them to avoid name collisions with other models that may be on the h2o cluster (am trying to remove these timestamps when saving on disk and simplifying the name on the cluster before saving creates a time where naming collision can occur if other processes are also attempting to save such a model (of, say, a different timestamp)).
Any way to get this behavior or other common alternatives / workarounds?
This is currently not possible, however I created a feature request here. There is a related question here which shows a solution for R (could be adapted to Python). The work-around is just to rename the file manually using a few lines of R/Python code.

Is there any way of importing Query with a custom directive applied?

I want to import Mutation.updateUser() from "./generated/prisma.graphql", but I also want to add the #isAdmin directive. I can accomplish this by copying the query by hand:
type Mutation {
updateUser(data: UserUpdateInput!, where: UserWhereUniqueInput!): User #isAdmin
}
But that means I have to copy every query/mutation/type I want to add a directive to, is there any sintax like this?
# import Mutation.updateUser from "./generated/prisma.graphql" #isAdmin
Unfortunately this is not possible at the moment. GraphQL SDL by default has no way of importing types or fields of types (as you want to do) into other files.
Based on the # import ...-syntax you show, I believe you're trying to use graphql-import. With this library it's possible to import entire types but not individual fields of types. If you'd like to have that functionality in the graphql-import library, please open an issue.

distinguish use cases in NSAutosaveElsewhereOperation

I try to add AutoSave support to the Core Data File Wrapper example
Now if i have a new/untitled document writeSafelyToURL is called with the NSAutosaveElsewhereOperation type.
The bad thing is, I get this type in both typical use cases
- new file: which store a complete new document by creating the file wrapper and the persistent store file
- save diff: where the file wrapper already exists and only an update is required.
Does somebody else already handled this topic or did somebody already migrated this?
The original sample use the originalStoreURL to distinguish those two use cases, which solution worked best for you?
Thanks

Add contents of Dexterity NamedBlobFile to SearchableText

I've created a dexterity content type that has a NamedBlobFile as one of the fields (users will upload a .pdf). I'd like to have full-text indexing on that pdf -- like the ATFile type -- but not sure what I have to do to make that happen.
I've installed collective.dexteritytextindexer and have gotten some of the other fields added to searchable text by doing this:
searchable('paper_author')
paper_author = schema.Text(title=_(u"Author"), required=False)
I'm not sure what to do for the file field. Suggestions?
I think using the searchable() directive should work for NameBlobFiles too.
There is a converter in collective.dexteritytextindexer taking care of transforming the file contents into text so that it is indexable (see the code at github), which also applies for blobs (since the INamedBlobFileField subclasses INamedFileField for which the adapter is registered).
If it does not work its a bug, so please create an issue at the collective.dexteritytextindexer issue tracker.
If the problem is that the field is not defined in your code and you cannot use the searchable directive, there is also a searchable function (import from .utils!) which can be used outside the scope of the schema like this:
from plone.app.dexterity.behaviors.metadata import IBasic
from collective.dexteritytextindexer.utils import searchable
searchable(IBasic, 'title')
searchable(IBasic, 'description')

How to add components in to an existing GUI created by guide?

I just created a GUI using guide in MATLAB for a small project I'm working on. I have amongst other things two text fields for from and to dates. Now I'd like to get rid of them and use a Java date select tool. Of course this is not possible using guide so I need to add them manually.
I've managed to get them to show up by putting this code into my Opening_Fcn,
uicomponent(handles, 'style','com.jidesoft.combobox.DateChooserPanel','tag','til2');
using UICOMPONENT.
But even though it shows up I can't access the date select's attributes, for example
get(handles.til2)
returns
??? Reference to non-existent field 'til2'.
How can I fix this?
Unless you edit the saved GUI figure, the basic handles structure will not include your new component by default.
One way to access you component is to store the handle via guidata, by adding the following to your opening function:
handles.til2 = uicomponent(handles, 'style','com.jidesoft.combobox.DateChooserPanel','tag','til2');
guidata(hObject,handles)
Functions that need to access the handle need the line
handles = guidata(hObject)
to return the full handles structure that includes the filed til2

Resources