I need to brand the sharepoint search box to allow scopes. When using the default SearchBoxScriptWebPart, the scopes do show as required. However I need the scopes to show as text besides the dropdown arrow (the default SearchBoxScriptWebPart only shows an arrow which when clicked shows the dropdown with all the scopes). Then I tried using the SearchBoxEx which seems to be perfect for the job. However for some reason it is not loading the scopes I specified in the Site Settings > Search Settings.
Any ideas what I may be doing wrong for the SearchBoxEx?
This is the code I am using in the masterpage:
<SPSWC:SearchBoxEx id="SearchBox" runat="server" GoImageUrl="/_layouts/images/gosearch.gif" GoImageUrlRTL="/_layouts/images/gosearch.gif" DropDownMode="ShowDD_NoContextual" QueryPromptString="Start typing here" UseSiteDefaults="true" />
Note that I tried every possible combination of DropDownMode but still to no avail.
Thanks
Related
Following this disabled social account from logon sample. Here's what I see when the Local Account user exists and is disabled:
NB - I've changed the ContentDefinition so that it's using 2.1.7 instead of 1.1.0.
I'm assuming the "hide me" text box is to be hidden using css? Which would mean that I would have to implement my own Template?
Also, there's a Cancel and a Continue button. Because the dummy textbox doesn't actually do anything, clicking the Continue button does not work. So I assume I want to hide the Continue button, but only when the dummy text box is present? Does that mean I should be looking at Javascript?
Finally, the UserMessageIfClaimsTransformationBooleanValueIsNotEqual error message (defined in the AAD-DisabledUserPage Technical Profile) does not appear anywhere in the source of the page. It seems integral to the strategy in the sample. Am I missing something?
I've looked at Customise the UI, Customise the UI with HTML template and Enable JavaScript and page layouts. There doesn't seem to be anything on customising the generated content. Have I missed something in the documentation?
Very strange so I had a look at the sample.
This is an old sample. It still uses "socialIdpUserId".
<! - The claim socialIdpUserId has been renamed to issuerUserId →
I renamed this in the base file to "issuerUserId".
Essentially, they needed a "dead-end" page.
But the dead-end page needs an output claim so they made a dummy one but wanted in removed!
I would have used a paragraph element. Maybe it wasn't available then?
I wrote that up a while back.
My version is in this gist.
If disabled, the user sees:
You can hide Cancel and Continue by modifying the technical profile. See the Metadata section here.
I received an assignment to have a look at Java Server Faces project and maintain the existing code if possible. My background is ASP.net , and never made a Java program previously. The problem is like this : there is existing file code named policy_list.xhtml (with also several beans attached to UI component in the file) and lets say it attach to menu Policy List. If user click the menu, the policy_list.xhtml will show the list of Policy. I copied the policy_list.xhtml file and renamed it to a new file renewal_list.xhtml. And I created a new menu Renewal List and attach the link to renewal_list.xhtml. I did not make any changes to renewal_list.xhtml. However , when I click the Renewal List menu, the page did not show any data like the Policy List menu. There is no error shown in the page What is wrong with the Renewal List page. Is it the behaviour of JSF ? On the IntelliJ IDEA debugger, I have not found any error. However the Search button in the renewal_list.xhtml working fine just as policy_list.xhtml. All the action link in the dataTable does not work in renewal_list.xhtml. I guess I am missing as particular setup on the menu or else ? Any ideas ?
My God, I have to registered it on pages.xml . Now, its working. Thanks to the powerful search of IntelliJ idea.
Currently trying to write my first NETSuite PDF template, and am struggling with so many aspects of it.
I am unable to add an "End Of Page" to my template.
When I click the button, nothing happens.
I have tried...
Examining default templates in which I can add pages, and identifying the code change associated with the change. I could not find any change.
Creating a brand new template, and trying to add a new page. I was not able to.
"End of Page" just inserts a page break - <pbr />.
You can switch to Source Code view to see exactly where it's inserted, and usually it's not where you want if you're using the WYSIWYG editor. So you can move or manually enter the <pbr /> in the correct place in the Source Code editor instead.
I recently migrated a crm 4 database to crm 2011. We are using the on premise version.
I am now adapting scripts and forms to crm 2011. With one of my forms I have the following issue: I am trying to hide the owner from the form.
To do this I have unchecked the "Visible by default" check box on the Field Properties form.
This works on most forms, but on one of the forms the owner is displayed no matter what I do. I've been able to move the field around in the form, remove the label etc. All this works, but changes to the visibility will not work.
Has anybody seen this? Why is it not working? Does anybody have an idea on how to fix the issue without writing custom javascript (this probably would work, but I'm interested in getting the "Visible by default" checkbox to work again.
Update
The custom entity only has a single form defined.
There is no custom javascript on this form but I checked for javascript errors anyway and there were none. Even more strange, if I look at the html code I see
the following code if the check box is NOT ticked (style visiblity set to visible!):
<td class="ms-crm-FieldLabel-LeftAlign ms-crm-Field-Required" id="ownerid_c" style="visibility: visible;">
whereas is the checkbox IS ticked I will get (no style attribute at all!):
<td class="ms-crm-FieldLabel-LeftAlign ms-crm-Field-Required" id="ownerid_c">
needless to say that I did publish my changes.
On a form where the check box is working as expected I see the following html (style attribute display set to none):
<td class="ms-crm-FieldLabel-LeftAlign ms-crm-Field-Required" id="ownerid_c" style="display: none;">
Update 2
This issue is happening in the update form of the entity (so the owner is not null).
I moved the owner to a section and tried hiding the section, but unfortunately the section
will not hide. *But if I move the owner out of the section, the section will hide. I wonder what this owner field has, that won't let me hide it.
This plagued me for ages until I realized what was going on. I was trying to make an update form completely readonly. The CRM form requires at least one readable field on an update form. When it doesn't find one, it leaves one visible and readable (normally the owner or name field or whatever happens to be the last field on the form). I found the following javascript code somewhere and it works well to disable all the fields on the form without showing the pesky owner field that you have set not visible by default. (Props to the author as I don't remember where I got it)
function DisableFormFields() {
Xrm.Page.ui.controls.forEach(function(control, index) {
if (doesControlHaveAttribute(control)) {
control.setDisabled(true);
}
});
}
function doesControlHaveAttribute(control) {
var controlType = control.getControlType();
return controlType != "iframe" && controlType != "webresource" && controlType != "subgrid";
}
Because this is such a basic part of forms in CRM, I'm going to guess that your true problem is something else that results in the field not getting hidden. If you push F12 in IE, and go to the script tab to debug, do you see any javascript errors?
Also ensure you're looking at the correct from. In CRM 2011, you can have different forms for different roles, so be sure to check the forms drop down on the upper left.
And don't forget to publish your customizations!
Edit
I do know that if a field is marked as required, it will display it anyway if you attempt to save the form and it is null. Is this happening on a create of the entity, or an update of the entity with the value already populated?
I'd try moving the field to it's own section, and making the whole section not visible. This is also a good practice because if you add additional fields to the form, the hidden ones will take up space in the form.
Are you using the RTM version of CRM 2011? there is a known bug that has been fixed with rollup 1
You cannot set field visibility to "true" through the Client API when the Visible by Default field is not selected.
maybe your problem is related/connected to this bug
you can read the changelog here:
Update Rollup 1 for Microsoft Dynamics CRM 2011 is available
On my home page, I want a simple webpart that allow users to quickly fill an entry in a list.
The list have, let's say, three fields : title (text), body (rich text), category (lookup).
I don't want to use the standard DataFormWebPart because I have a bit of code-behind that also fill some technical hidden fields of my list (actually, I don't exclude the DataFormWebPart, but I didn't find how to use it with code behind).
So I started to implement a custom webpart. Because I don't want to have to handle manually each field input, I started to use the FormField control, which automatically choose the rendering control, and provide a Value property with the correct format :
<SharePoint:FormField runat="server" id="fldTitle" FieldName="Title" />
This code is not sufficient, I have to specified the listid :
<SharePoint:FormField runat="server" id="fldTitle" FieldName="Title" ListId="{title list guid}" />
This is working quite correctly. I can in code access the fldTitle.Value to retrieve the user input.
BUT I have to include the webpart in a properly packaged and deployed feature, that can be activated. The webpart will always target the same list, but as the list is also instanciated in the feature (ListInstance element), I can't know the Guid in advance.
I've tried using several technics to set the list ID on the fly, but without success.
I've also "reflectored" the SP dlls to notice FormComponent class are using a "Context" that is set by ListFormWebPart.
Finally, my questions are :
is it the correct way to create a custom input webpart on the home page (not a list custom form) ?
how can I keep the behavior of the FormField (choose the right control and handle the input and its conversion to the storage format) ?
Will I have to create a custom ListFormWebPart ?
May I play with ControlTemplates ?
thanks in advance for the help... I'm struggling with this simple case for days now...
I think that customizing form templates is the easiest way to customize list forms. Since custom form templates are implemented as user controls you can add whatever code you want.
See the following article:
http://www.codeproject.com/KB/sharepoint/SharePointListForms.aspx