In Microsoft Dynamics 365, why is my filter not a combo box when I am running start my Visual Studio Project? - forms

I'm currently following the tutorial "Creating a custom filter control" in Dynamics 365 for Finance and Operations Development Cookbook - Fourth Edition
I've created the extension to the MainAccount which includes, under NavigationList(Group) -> Filter (Group)", an instance of Combo Box with the following properties:
| Property | Value |
| Name | FilterType |
| AutoDeclaration | Yes |
| EnumType | DimensionLedgerAccountType |
| Selection | 10 |
In Visual Studio's preview, this displays correctly and offers the expected set of values.
I've set my project to be my startup project.
I've set my form extension to be my startup object.
... and then I click "Start".
After some long wait for the page to render, I find the labels for the fields are displayed with short black lines where the input fields should be, but the input fields hardly allow any interaction. I can click on them to select them, transforming them into blue box shapes, but I can't actually type anything into them and the input which should be a drop-down/combo-box for "type" has no visual or functional distinctions from the input for "name" which should just be text.
Is Visual Studio failing to deploy something?
Is there some additional modification needed in my metadata for this to render as expected?
What do I need to do to fix this?

Because you mention that you click "Apply", I think you are in the wrong area of the form.
Take a look at the screenshot from my implementation of the recipe, you can see there are two filter areas on the form. The first is the standard filter experience and the listed fields are based on the ranges set on the query of the form. Those fields are text fields because they allow you to enter filter values which may be different from one possible value. The second area is the one where the two custom filter controls described by the recipe in the cookbook were added. As you can see in the screenshot, the "Main account type" control provides a combo box behavior with the allowed values. If you change a value in on of these two controls, you don't need to click "Apply". Instead, the filters are applied automatically when the onModified event of the control fires.

With thanks to FH-Inway who spent some time screen sharing, it turns out the problem was not with the solution but with my expectations.
I expected the filter fields to simply be displayed and immediately available for use.
However, in actually -- completely counter-intuitively -- the fields, being created as part of the form, are only editable after one clicks the "Edit" button.
Once in edit mode, the fields display and interact as expected.

Related

vscode extension how to display a form

I wish to create a VSCode extension with an entry form on it - some way of input. So far I have only seen document processing or output for an extension.
How can you display a form of input fields in a vscode extension?
How much data do they need to enter? If it's not much, you should be able to handle it with a series of InputBoxes
From https://code.visualstudio.com/docs/extensionAPI/vscode-api
showInputBox(options?: InputBoxOptions): Thenable<string>
Opens an input box to ask the user for input.
The returned value will be undefined if the input box was canceled (e.g. pressing ESC). Otherwise the returned value will be the string typed by the user or an empty string if the user did not type anything but dismissed the input box with OK.
Parameter Description
options?: InputBoxOptions
Configures the behavior of the input box.
Returns Description
Thenable<string>
A promise that resolves to a string the user provided or to undefined in case of dismissal.
The Visual Studio Code API does not have any native methods to display forms to collect input. You can however, chain together Input Boxes, Quick Picks, etc... You can find all these methods under vscode.window.(...).
If these do not satisfy your needs you can implement a webview which allows you to render integrated HTML in Visual Studio Code and trade messages with the extension.
The most simple aproach would be to simple send all collected data from the form to the extension once you hit the submit button or something similar.
You have a nice little tutorial on how to do that here.
Another approach is to see how far you can go with editing JSON objects in settings.json. I thought I would need a form for 8-10 fields, but it turns out that I can create a settings template that has a series of labels and and entry fields (with type validation).

CQ5/AEM: Creating sidekick components using 1 cq:component + multiple data nodes

I am working on a component that is essentially a building tool. I can't go into a lot of detail as to what it is, however the greatest parallel I can draw is that of a product list builder. The concept being that the author wants to create custom lists of products. These lists will live in a singular place and be referenced from many different pages within our content.
work flow:
create && build /content/myproductList
content/mySite/myPage/jcr:content/specialListView #property list points to /content/myproductList
Currently everything is pretty hunky dory and is working fine. The authors wanted the list building to be drag and drop, just like the rest of the site. So I created components to represent the list items and they can just open up a new builder, and drag/drop/reorder the list as much as they like and it will be refreshed within the 'specialListView'.
There is a huge flaw in my design and I want to see if I can overcome it. The flaw is etched in the way that I create the list item components. Essentially all of the items are structurally identical(in terms of markup), they just differ in content. So what I did was created a base component to control the markup and basic workflows (dialog, etc). Then I created a new component for each list item, these components have nothing but cq:template nodes that hold their information.
ex structure:
components/lists
| defaultItem
| defaultItem.jsp
| dialog.xml
| customeItem1
| .content.xml (resourceSuperType = components/lists/defaultItem)
| _cq_template.xml (has custom information)
| customeItem2
| .content.xml (resourceSuperType = components/lists/defaultItem)
| _cq_template.xml (has custom information)
...etc for 25+ items
By setting it up this way, we now have a workflow where the authors can drag and drop the components directly onto the page and not need to configure them or open dialogs and choose the correct dataset/etc. However, this seems extremely long winded and bulky. Scalability is an issue as well (what if they want to create 100 new items tomorrow -- sadly this is my reality).
What I'm proposing is to find a way to normalize this down so that I have a set of data (the list items) and 1 component to act as my structure.
something like:
/etc/data/lists/items
item 1
- nt:unstructured
- label=foo
- type=defaultItem
...etc
... etc, etc for all 25+ items
/apps/myapp/components/lists
defaultItem
| defaultItem.jsp
| dialog.xml
This is where I get stuck. If I have a structure like this, it makes it very difficult to have item1,item2,item3,...etc show up in the sidekick as drag and drop elements. I'm guessing I will need to get into the portion of JS that generates the sidekick items, but I'm not sure how to approach it from there (haven't messed with customizing the sidekick yet). Just looking for guidance if anyone has dealt with anything like this before.
[sidenote]
If you're curious why I'd like to move it to the second design, it's because eventually the authors would like a control panel that would allow them to create items on their own. It would be much easier and a lot more lightweight to have a system that alters a singular node and it's properties rather than one that has to manage creating/altering full component structures. It also decouples the 'item components' that the authors would make from the actual components that the developers create. This is important because the the component code we create is versioned/etc, whereas these faux components would go unchecked and we would need another way to manage them.
As you already described, creating a new component for each product will result in a big overhead. Beside you will create components, which are linked only to one resource, so not re-usable anymore.
First you need to see a difference between the content and components. In this case your defaultItem is the component and the products the content. In AEM the contentfinder is created to display, search, drag and drop your content into the page. The sidekick for components.
The solution will be the following:
Create a custom contentfinder tab which loads all your products;
Loading products can be done by creating a servlet which returns
all relevant products in a json format
Create a generic component (eg. defaultItem) which can display your
product into the page by setting a reference link to the product;
Configure the contentfindertab to create the defaultitem component
when dragging the product into the page
Take care about the CQ.wcm.ContentfinderTab.getResultsBoxConfig. At itemsDDNewParagraph
you can configure the new component type (defaultItem) and the
property to link the component to the product.
How to create a contentfinder tab:
http://helpx.adobe.com/experience-manager/kb/CustomCFTab.html
Note: when dropping a product from the contentfindertab into the page, use the ALT button

Salesforce: Auto-complete for Lookup field

I have a custom object known as "Companies".I have created a lookup field in a Visual Force page which gives me the list of companies name from the custom object " Companies".I have written a code which makes this lookup field auto-complete like what you have seen in the image attached.(First pic)
The problem: I don't know how to make the lookup field (which takes the list of companies name from custom object" Companies" in "Opportunities" standard object) auto-complete as done in the visual force page. Basically want the field highlighted in yellow in the second picture to auto-complete or give relevant suggestion when I type the first few characters.
Any help on this matter would be appreciated. Thank you
Have you tied enabling Auto Complete for your custom object the search page?
Click Your Name | Setup | Customize | Search | Search Settings.
Check the Lookup Auto-completion check box for your object.
This will give you auto-complete options for recently used items.
http://help.salesforce.com/help/doc/en/search_lookupdialog.htm#auto_complete
You will not be able to embed this customization into a standard page layout like you're using for the Opportunity object in your second screenshot. If that auto-complete is a must-have, then you really only have two options:
Replace the entire Opportunity page layout with a custom VF page
Write a VF component with just the Company lookup field in it and embed it into your Opportunity page layout (this will have to be in its own section, which probably won't look as nice)
This is what you want - http://tapp.ly/autocomplete/
Autocomplete Lookups for Salesforce enables any Salesforce Lookup field to support autocomplete suggestions. Autocomplete Lookups helps your users enter lookup fields reducing data entry tasks and error rates.
Salesforce records suggested as you start typing
Search All fields (Standard Salesforce Lookups only let you search by the Name field)
Results can show any field (E.g. Case Subject rather than Case Number)

How to add a simple text label in a jqGrid form?

When using the Add or Edit form from the pager I'm wondering how a simple static label can be added in the form without it creating any additional columns in it's affect on colNames[]'s and colModel[]'s. For example I have a quite simple typical Add form which opens from the pager containing a few label's and form elements: Name, Email, Web Site, etc., and then the lower section of the form has a few drop down menus containing the number 1 through 10 with the idea being to ask the user to pick a value between 1 and 10 to put a value on the importance to them about the product or service which is listed beside it. Just above this section I want to add some text only to give a brief instruction asking the user to "Choose the importance of the following products and services using the scale: [1=Low interest --- 10=Very high interest]". I cannot figure out how to get a text label inserted in the form without having to define a column with a formoption{} etc which is not needed for just some descriptive text. I know about the "bottominfo: 'some text'" for adding text to the bottom of the form but I need to insert some text similar to that mid-way (or other positions) in the form without it affecting the tabular structure of the grid. Is this even possible? TIA.
You can modify Edit or Add forms inside of afterShowForm. The ids of the form fields are like "tr_Name". There consist from "tr_" prefix and the corresponding column name.
I modified the code example from my old answer so that in the Add dialod there exist an additional line with the bold text "Additional Information:". In the "Edit" dialog (like one want in the original question) the input field for one column is disabled. You can see the example live here. I hope that a working code example can say more as a lot of words.

Make a radio button in an infopath form "read only"?

I'm making an InfoPath form which is tied to an Access database. I have a set of radio buttons where the user selects the software name corresponding to the form, but I store this in my database as a number (1, 2, or 3). In another view, I want them to be able to see the previously entered software name, but not be able to change this. Here are the two options I've thought of:
Create some rule that does prevents the user from changing this data
This seems like the natural approach for what I want to do.
Add a text field with a function mapping each number to the corresponding software
As the form is tied to the database, InfoPath wants all fields to be tied to a database value, which would require creating another database entry. I'm also having trouble finding an InfoPath function I can use to handle this mapping.
Change the radio box's variable to text values and make a text box in the new view, which can be made read-only.
I'd really prefer not to do this, as it will make things messier for other programs using this database value and seems wasteful, but if nothing else works, this seems do-able.
Is there some sort of rule/method I could use to make this radio button control read-only?
You can use conditional formatting to disable any control (including radio buttons).
To set your control to always be disabled do the following:
Right click on your control and select Conditional Formatting...
Click Add...
In the leftmost dropdown select The expression
type true() in the text field (this tells InfoPath to always apply this formatting)
Check the Disable this control checkbox.
Click OK and OK.
Note: You will need to do this for each of your radio buttons.
Also, for future reference: If you simply want to display the result of a function (such as in your second solution) you don't need to use a text box. You can use an expression box. An expression box is not necessarily linked to a field in the datasorce, so you won't need an additional column in your database for it.