I have created a Master-detail custom screen and is there any way i can disable add (+) to prevent entering record in detail grid with out entering data in master?
At present both Location & Location color add button enabled and it allows to enter records
You can use something like:
DetailsView.AllowInsert = MasterView.Select().Count>0;
Related
Is there a way to rename the 'Receive' button on PO record? I thought this could be accomplished by customising the form > Actions > Standard Actions. It seems the action name is used and not the lable. I want action named to be changed to something like Generate Bill.
Add a User Event script to the purchase order and in beforeload event write the below code
var rcvBtn = form.getButton('receive');
rcvBtn.setLabel('Receive Custom'); //Set as "Generate Bill"
form.getButton is a method of nlobjForm and it will get the button
as nlobjButton
setLabel is a method for nlobjButton to change the
label.
Thanks
Frederick
You can Change Label from 'Customize form'
Go to
Customization >> Forms >> Transaction forms
Select 'Standard Purchase Order'
Action(Tab) >> Standard Action(Sub tab)
Just change the button Label from 'Receive' to 'Receive Custom'
select preferred checkbox and save
Check
http://awesomescreenshot.com/0ba5smd821
I have my setup type dialog looking like this :
The top option is a custom one I added.
So in my next button push event, I have this :
So what I would now like to do is load up the custom setup dialog, but those features should be enabled / disabled depending on what was selected.
OR
If completer or first custom option is selected, I want to open a dialog conditionally.
Is this possible?
You can do the following:
Note the 'value' attribute of your new radio button (by default it should be '3')
Add the appropriate events with the condition _IsSetupTypeMin = "value"
Here is an example showing how to define the 'Next' button behavior to do the following:
When selecting 'typical' it will select the proj_files feature and
proceed to the ReadyToInstall dialog
When selecting 'custom' it would
go to the CustomSetup dialog
When selecting the special option it
will add feature2 and remove the proj_files feature, then proceed to
the CustomSetup dialog.
I have my account entity linked to a custom entity called inspections, I only want these inspections to be created for accounts of a certain type. So when it isn't that type I want the left hand navigation to this entity to be hidden away. I've seen some code that says will hide it away, as long as you have the navID of the item.
I've had a crack at hiding it using what i thought could be the ID but it hasn't worked, so I'm wondering if anyone knows how to get this ID, or if there is another way to do this?
The code I'm using to hide the navigation is below:
var navitem = Xrm.Page.ui.navigation.items.get("nav_ts_inspection");
if (navitem != null)
{
navitem.setVisible(false);
}
Load the form
Press F12 to show IE Developer's Toolbar
From here you can use CTRL+F to search for the display name of the item you'd like to hide. This will give you a link that is generated. The Id of this element is what you need to use to show/hide the link.
As an example, you can see results of searching for 'Sub Accounts' on the Account screen for an installation I am working on at the moment. The Id can be seen and is 'navSubAct'
Changes by traversing DOM and manually hide an area is not officially supported.
Luckily if you are on CRM 2011, you can go to
Settings > Customization Or open the solution.
Select the entity > Forms. Inside the Form editor window, open the Form Properties of the entity.
Go to Display Tab and untick "Show navigation items" checkbox.
Finally do not forget to Publish your changes.
Use the relationshipname to hide folder in navigation like this:
If you have folder with the relationship name: ts_inspection
Use this for ID: navts_inspection
So otherwise the same as above, but lose the extra underscore (_) between nav and ts.
var navitem = Xrm.Page.ui.navigation.items.get("navts_inspection");
If you want to hide particular navigation section from the FORM then remove all the links from that section and publish it. That section will not be visible anymore.
If you want to just remove Navigation Pane from FORM, then go to 'Display' tab of form and mark as 'Do Not Show' and then publish it.
I have an extension pages dialog box that I placed in a custom control. The dialog box is used to search for cost centers and return information such as market, cost center number, cost center name etc.
A "Select" button is pressed and the dialog box appears. The user searches for and selects their cost center. The OK button is pressed and it closes the dialog box and updates the various fields on the xPage.
A couple of questions.
Currently the "Select" button on the CC needs to know and refer to the name of the dialog box control within the CC. Seems to me that this is not the best practice. My end user programmer needs to know the ID of that dialog box control within the CC. Is there any way for my "Select" button could "show" the CC and the CC would actually show the dialog box control?
My CC makes use of custom properties to store the various document fields from the selected cost center. The OK button then uses these properties to set the various fields on the xPage. This again does not seem to be a best practice. If I wanted to use that CC in another application then I might need to edit the code in the OK button. Is there a better way to deal with this? Like I can set properties for a CC when I drop it on my xPage, is there a way I can tell it the code that I want to execute when the OK button is pressed?
One thing I thought was to have properties for the fields that need to be updated by the OK button but that does not seem to be so flexible.
For the issue of needing to know the id not sure if theres a typo but I don't understand why its bad that a select button inside a cc needs to no the id of the dialog to open it? did you mean the select is outside the cc? either way have you tried anything like creating a property on the custom control so that from outside it you can set something maybe
<xc:mycustomControl showDialog="false">
and then when something outside it happens change showDialog and refresh the cc, then inside the cc you can have a before / after page load to determine what happens when showDialog is true / false.
For your second issue it sounds to me like this should be using a domino document structure. Rather than the dialog pulling out each piece and the ok button updating, what I would do is have a domino doc data source on the page. when something is selected through the dialog I would update the document this source is pointing to and have all the fields bound to what ever fields they need to be. This way after something is selected the fields will just update to what ever the document contains, and it will be much more re useable so long as the domino docs have the same field names
I have two instances where I want to re-direct the user to the main view of a TabBarViewController. I've tried BringSubViewToFront(), but that does nothing... I basically want to activate the first tab (home tab?).
Assuming your TabViewController already has all the ViewControllers created for each tab, simply changing the SelectedIndex property in the tabbar does what you're looking for:
myTabBarController.SelectedIndex = 2;
Will send you to the third tab (array is zero-based).