Hiding document changed message for name picker after enabling enableModifiedFlag property - xpages

I have a enabled this property on the form. The form has various fields along with few name pickers. When I click the Name picker I get the document changed message. How can I stop this message for Name pickers?

This issue fixed in Domino 9.0 - and should be present in the Public Beta of 9.0 published before Christmas 2012.
Also, this fix should also be available in the Extension Library releases post November 2012.
If it is not working for you let me know.

We recently upgraded to Ext. Lib version 8.5.3.20130315-0724 (4 Apr 2013). But still enableModifiedFlag does not work in IE. I have tried to describe steps below :
Open Xpage with enableModifiedProperty set to "true".
Update any input field.
Select name from value picker.
Press "X" on selected value. Boom...it shows "Do you want to move away from this page" dialog.
I checked in FireFox. It works as expected.
Cheers,
Ravi

Related

How to change the Data panel properties hover over information?

I am trying to find out if it's possible to customise what gets shown when I hover over any of the properties inside the Data Panel (inside the Spotfire Analyst). The current behaviour is to show the name of the property itself but I would like to change it so it shows a description showing what the property means.
According to TIBCO community, the option to see a description upon hover over is available in Spotfire 10.3. The version I am running is 10.0.

Shipment's page customization removes UpdateIN Action

I noticed that customizing the Shipment's page "Confirm Shipment" action, removes the "Update IN" action from the dropdown list. This is occurring even without actual logic in the overriden method - as soon as it's created and published, the action disappears.
Below is the list of steps that I have followed:
The Actions dropdown options for the Shipments page are:
Then, the following customization is created
Which - without any changes - generates the following result:
After publishing the customization, the Actions dropdown is now shown with the UpdateIN action removed:
I noticed that the UpdateIN action is not selectable in the Override Method option of the customization project - that could have some relation with the error:
The action definition however, can be found in the CodeRepository directory (with Visible = False):
Any ideas? Thanks
If I'm not mistaken, this issue has been fixed in 2017 R2 Update 3 (build #17.230.0029). Could you please update your developer instance to 2017 R2 Update 3 or more recent build and check if the issue gets resolved?

In crm 2013 the AttributeInfo.GetValue returns wrong value

We are experiencing a strange issue, which can be reproduced by following below steps:
Open New Task (Or any other entity)
Enter text “Test Subject” in “Subject” field (or use any other field).
Use this Xrm.Page.getAttribute("subject").getValue(); statement to
get the value of subject’s field, it will return “Test Subject”.
Now clear the subject field.
Use this Xrm.Page.getAttribute("subject").getValue(); statement to
get the value of subject’s field, it will return “Test Subject”,
which is wrong value, the subject field is empty.
The Xrm.Page.getAttribute("subject").getValue() returns wrong value. We checked this issue in CRM 2011 and its ok the issue is specific to CRM 2013.
EDIT:
This code is fired from Custom Ribbon Button.
We tried to change the focus to another control and then we checked the value, it not works.
EDIT:
This issue occurs only if the field is a required field.
The logic of CRM page is that it changes data inside of the Xrm.Page.data object only if the edited field lost focus (this event tells CRM that the data entry is done), so it could be that after step 4 you don't lose focus to other field. This behavior is the same as in CRM 2011.
I think you have two problems here although they maybe cause by the same thing. This is unfortunately not an answer to these problems but an attempt to clarify the above.
Problem 1: JavaScript reads previous value when an empty value is entered.
I think this is the same as the original problem of this post.
This is also posted at: http://partnersupport.microsoft.com/en-us/mpndynamics/forum/mpndyncrm/javascript-reads-previous-value-when-an-empty/f7b8dffd-3a21-48ae-8dca-4c5467ea8272
On the Competitor form.
Enter “Oliver” in the name field.
Then read it in JavaScript as below.
function ClickHandler()
{
var nameValue = "";
nameValue = locationValue = parent.Xrm.Page.getAttribute("name").getValue();
var test1 = "";
}
You should get “Oliver” as expected.
Then go back to the Competitor form and manually delete the text with the backspace key.
Now read what is in the name field with JavaScript as was done earlier.
You would expect to get nothing but you get “Oliver”.
Now enter Mark in the name field.
Read the field with JavaScript and you get “Mark” as you should.
So it seems when an empty value is entered following a previous value the JavaScript reads the previous value.
To put it a different way. It seems that there is a problem if the Name field had a value and the text then gets manually deleted. The Xrm.Page object will not update to the empty string. The Xrm.Page object will however update to a non-empty value.
Problem 2: Javascript cannot read the value in the text field if the field has not lost focus.
This is also posted at http://partnersupport.microsoft.com/en-us/mpndynamics/forum/mpndyncrm/javascript-cannot-read-the-value-in-the-text-field/ecc2c9e0-fba0-44f2-93cd-320d042896f0?tm=1389885238744
Javascript cannot read the value in the text field if the field has not lost focus.
On the "Recurring Appointment" form I have an IFRAME that runs Javascript. It reads the value in the location field when a button is pressed. If I change the value in the location field to say "Brunswick Street" and press the button I get nothing read (i.e. in the code below locationValue is null).
However if I change the value in the location field to say "Brunswick Street". I then then click away to somewhere on the form other than the IFRAME so the location field has lost its focus (this can also be achieved by pressing enter/tab after entering the text in the location field). If I then press the button on the IFRAME the Javascript will read the text in the location field correctly.
I gather that this is because parent.Xrm.Page is only updated when focus is lost in a field.
function ClickHandler()
{
var locationValue = parent.Xrm.Page.getAttribute("location").getValue();
}
I tried changing the focus in the JavaScript by setting it to requiredattendees field. But this did not work.
parent.Xrm.Page.getControl("requiredattendees").setFocus();
I used to use parent.document.forms[0].namedItem(srcDataFlds[fld]).value; to get the value in CRM 4 and 2011 but this does not work in CRM 2013. So as the SDK suggested I changed the code to use parent.Xrm.Page however it seems to give the problem above.
The questions are why is the focus not lost when I click the button on the IFRAME? If I click on any field in the form the focus changes so why not the IFRAME.
Also how can I get the JavaScript to read the value in the location field without having to click away from the location field. (Hopefully read the value in a supported way)?
I just want the user to be able to enter the value in the location field and click the button in the IFRAME.
I also noticed that when you click the IFRAME the On Change Event is not fired for the location field.
So far the only way round this is to click on another field (or pressing enter/tab) before clicking on the button that fires the Javascript.
Both these problems have been recognized by Microsoft and have been fixed in “Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1”

MS CRM 2011 forms: "visible by default" Field Property checkbox is not working

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

Issue after editing Search Properties in coded UI?

We are using coded ui test using visual studio 2010.We are testing .Net 4.0 windows application.
Here is an scenario.
We have an windows app which has a button named submit and we have recorded a workflow which clicks on submit.
Now when we generate code using coded ui the serach criteria for the button is based on its name (display name of button).
If tommorrow developer changes the button's text to submit1 , our scripts fail.
We tried using "controlName"[name given to the control and not the display name] property in search criteria instead of Name , but it does not work.
We get following error - "The playback failed to find the control with the given search properties"
Related problem happens to me also. I solved it by sending the Focus to the UI control before using that control.
Try this.
this.UIAssettePresentationsWindow2.UINOWindow.UINOButton.SetFocus();

Resources