How to hide Actions button in Sales Order screen - acumatica

Can some help me to hide Actions button in Sales Order screen for Transfer Order type, please suggest.

You can use following line of code to hide button pOSupplyOK, which has title PO Link:
Base.Actions["pOSupplyOK"].SetVisible(false);
You can find necessary value of string via looking into source code like this:
Acumatica creates array of each button, and indexes it by string name of action.

you can put it on the DAC_RowSelected event and make the buttons not visible by using
if(row.DocumentType?(I can't remember the field) == TransferOrderType) //just a pseudocode.
{
Base.ButtonVariableNameHere.SetVisible(false);}

Related

Enable/Disable is NOT working for Grid button

In the Invoices screen, I have a new customized field on the Header and also added a new button on the Document Details tab above the grid.
Based on the Customized field condition we need to enable and disable the button. I have added this button as a toolbar button and added enable/disable conditions in ARInvoices row selected event but it is NOT working as expected. Can you please provide your thoughts on this?
Please find the screenshot for reference.
Thanks in Advance.
Naveen, I have found a section of the Framework documentation that has some description of what you are trying to accomplish. let me know if this helps?
https://help-2020r2.acumatica.com/(W(1))/Help?ScreenId=ShowWiki&pageid=a0f8f9e9-7997-4325-bc69-b58039dd3699
So based on this it sounds link you need to "un-set" a DependsOnGrid as that is what is used to get the button to an inactive state when the grid is empty. It sounds like you are looking for the opposite.

Force user to select only one value from filter spotfire

Is it possible to force the user to select only one value from a filter ?
For a radio button filter as below, is it possible to remove the buttons all & none and make sure that only one Choice is selected ?
you cannot change the existing filter features or functionality without developing a custom extension for a new filter control.
that said, you can certainly emulate a filter using what's called a Property Control and a Data Limiting Expression. for single selection, you're stuck with either a Dropdown control or a Listbox (single select) control.
you would need to...
create a Text Area Visualization on the page somewhere
insert a Listbox or Dropdown Property Control into the Text Area Visualization
create a Document Property with the same data type as your filter column and associate it to the Property Control. you can set this to Unique Values in Column or write in your own Fixed values.
open the Properties dialog on the visualization you'd like to filter and navigate to the Data page
scroll down to Limit Data Using Expression and use an expression like [MyFilterColumn] = "${MyDocumentProperty}" (quotes are required for string values; if numeric then omit quotes)
Please add this CSS in the HTML page of the spotifre to remove all and none
.ColumnFilter .sf-element-filter-item:last-of-type { display:none; }
.ColumnFilter .sf-element-filter-item:first-of-type { display:none; }
Another way to force the users to select one option is to add a Show/Hide in the visualization like this: Hide if UniqueCount([Field]) is greater than 1

Replicate Add button functionality on FormDetail screen

I need to create the button to replicate when user click "+" button on the top of the screen then populate value of the field.
Base.Insert.Press();
However, I have an issue that code above does not clear the form like when user click "+" button. I need to be able to clear the form after insert like when click Acumatica's "+" button. I have try following code in attempt to clear the form but no luck.
Base.Caches.Clear();
Base.Document.Cache.Clear();
Base.Document.Cache.ClearQueryCache();
Base.Document.View.RequestedRefresh();
The below code works in Sales order extension. What I did is; I cleared the whole graph and then inserted a new header record to the header cache.
this.Base.Clear();
SOOrder head = new SOOrder();
this.Base.Document.Insert(head);

How to add Listpicker to textbox in LiveCode

I want to add a list picker in Live code.When a user click on the Textbox the list picker should open with list of items.How can do that?
Be aware that your text field must be locked in order to send a "mouseUp" message, if that is how you want to show the combo box that Monte suggested. There are other ways around this, if you still want to be able to type into that field. Write back with your exact needs.
The combo box is useful because you can type right into it. If you only want options that will load data into an existing field, a popup or pulldown might be something to look into.
On the left side of the tool palette about the middle is a style of button called a combo box. I think that's what you want.

XPages - populating multiple fields on typeahead selection

This might be a straightforward question but I can't see wood for trees at the moment
Problem: I have a typeahead attached to an edit box that looks up values from a view (based on Tim Tripcony's code). When a value is selected, I want other edit boxes on the XPage to be populated with values pulled from the corresponding document.
As an example: A username edit box has a typeahead looking up from the NAB. I select "Joe Bloggs" name from the typeahead list and want the email, phone and location edit boxes to be immediately populated with the values from his NAB entry.
I'm banging my head on the wall over this because I'm sure there's an easy and obvious solution. Thanks.
Selecting a value from the typeahead should trigger any onChange event defined for the edit box. You can set the other fields by updating the data source directly from within that event:
var selectedName = currentDocument.getValue("contactName");
currentDocument.setValue("emailAddress", getEmail(selectedName));
currentDocument.setValue("phoneNumber", getPhone(selectedName));
currentDocument.setValue("location", getLocation(selectedName));
Naturally, the above example assumes those are your field names, and that you have the named functions defined elsewhere.

Resources