This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Execute command documentation

Hello,

I'm building a UI application, and I'm struggling to figure out how the execute commands works (especially the arguments) :

I want to create a multi lookup object, if I send the object type id in the argument it works, now i want to link the new object with the "parent" object, and as there is no documentation on this, I'm asking for your help please ?

Thank you in advance

  • Can you show me via code what you're trying to do?  There's no such thing as a "multi-lookup object" (a property can be a multi-select property with multiple values, but not an object), and I don't understand how the arguments come into this.

    In general terms linking an object to another means creating a relationship by setting a lookup property on one object to point to another object, but I don't entirely see how everything fits together here.

    Alternatively (as you're a partner): maybe speak to your partner manager and/or open an Implementation Support Request to chat to one of our partner team?

  • Hello Craig,

    Here is the actual code : 

    ShellFrame.Commands.ExecuteCommand(MFiles.BuiltinCommand.NewSubobject, gMLObjectType);// gMLObjectType is a object type id

    To be clearer, what I want to do is to create & add a lookup to a multiple select lookup property from the UI Framework.

    Exactly in the same way that clicking on the "+" in the metadata card

    Sorry for the misunderstanding

  • The misunderstanding may be mine, so don't apologise.

    Which "+" are you talking about? The one at the top of the screen (to create a new object), or the one shown when you interact with a lookup property (to create a value in a list)?

  • The second one, to create a value in a list

    Thank you

  • Is it a value list or an object type?

    If it's a value list then there isn't a UI to show (the desktop client doesn't show one either; you type a value into the box and press enter) as it's just a name and maybe an owner.  If you do need to query it then you'll need to show a dashboard to get the value.  Once entered then use the API (M-Files API - AddValueListItem Method) to add the item.

    If it's an object type then you need to show the metadata card for the user to enter values.  Again: the API can be used here (and called directly from your UIX application): M-Files API - ShowPrefilledNewObjectWindow Method.  There are a few methods, but the "ShowPrefilledNewObjectWindow" method allows you to optionally provide values for the metadata card, possibly such as the owner you mentioned earlier.

  • Huge thanks for your help ! Slight smile