I am trying to create a customization to add the ability to create a sales quote from the opportunity screen on Acumatica mobile. Below is my mobile screen update for CR304000 (Opportunities). It adds a tab for Quotes and add icon for creating the quote.
Currently when I click the add icon it open a "Quotes" screen (first image) but when it is saved the app throws an error(second image).
I believe most of my issue is that it doesn't pull up the same screen as if the quote was being created via the sales quote screen(third image).
update container "OpportunitySummary" {
add layout "QuotesTab" {
displayName = "Quotes"
layout = "DataTab"
add containerLink "Quotes"
}
}
update container "Quotes" {
fieldsToShow = 4
listActionsToExpand = 1
formActionsToExpand = 2
containerActionsToExpand = 1
add field "Date"
add field "Type"
add containerAction "Insert" {
icon = "system://Plus"
behavior = Create
}
add recordAction "Insert" {
icon = "system://Plus"
behavior = Create
}
add recordAction "Delete" {
icon = "system://Trash"
behavior = Delete
after = Close
}
add selectionAction "Delete" {
icon = "system://Trash"
behavior = Delete
}
attachments {
}
}
}
first image
second image
third image
I'm trying to setup a custom screen in the mobile app, and there are a few things that are still a mystery.
One of them is how to get a PXTextEdit field to show multiple lines, or even allow entry into that field without it just highlighting the field and no way to add to it.
The other is how to add a Rich Text control to the mobile app ala the Cases screen. I've tried using the code to add it the way the Cases screen does. I have a PXRichTextEdit field, called 'Details', but this doesn't show up on the mobile app at all:
add field "Details" {
textType = HTML
}
In this context:
add screen AC503000 {
add container "MeetingAgenda" {
add field "MeetingID"
add field "Subject"
add field "Status"
add field "MeetingDate"
add field "MeetingTime"
add field "Details" {
textType = HTML
}
add recordAction "Save" {
behavior = Save
}
add recordAction "Cancel" {
behavior = Cancel
}
add recordAction "Delete" {
behavior = Delete
}
}
I've also tried to add a container called "Details" since this shows up in the WSDL file, and that shows a menu item, but takes you nowhere, and sends the app into a tailspin where it can't recover and has to be restarted.
At this point I'm lost as to how to do these two things...
To enable multiline mode, use
add field "Details" { textType = PlainMultiLine }
To show your PXRichTextEdit field try to use {Container Name}#{Field Name} from the WSDL
add field "Details#Details" { textType = HTML }
I'm trying to add the quick process to Acumatica app for sales orders, but when I try to add the container I get this error "sequence contains no matching elements". Am I just using the wrong container?
Here is what I have so far:
update screen SO301000 {
update container "OrderSummary" {
add recordAction "QuickProcess" {
behavior = Void
redirect = True
redirectToContainer = "ProcessOrder"
}
}
add container "ProcessOrder" {
visible = False
fieldsToShow = 2
add field "WarehouseID"
add field "CustomDate"
attachments {
}
}
}
Update it seems that the error happens only when I try to add the field WarehouseID. When I take it out it starts to work, but I do need the field on the app.
I have a field on a custom record. The name of the field is reference_code.
I want to populate "reference_code" with my own dynamic list which would be presented as a drop down to the user.
How do I do this? I defined my field as Free-Text. Do I need to keep it hidden but then show it as a drop down before I load the form?
I thought this might do something:
nlapiInsertSelectOption('custrecord_rulereferencecode', code, code, false)
But I would need to convert the field to a select?
Typically, instead of creating the field as Free-Text, you would first create a Custom List (Customization > Lists/Records/Fields > Lists > New) with all of your dropdown options.
Then you would create your field as a List/Record field and select your new Custom List as the "List/Record Type", as depicted below.
This can be done by giving a source to your drop-down menu. The source field accepts an internal id of a list. This internal id can be an in-built(provided by netSuite) or a custom list created by a user. For Eg: I have a custom list with an internal id '23' which has some list items in it, these can be populated in the drop down menu by the following syntax.
var start = function(request, response)
{
var form = nlapiCreateForm('Custom Form');
form.addField('custpage_selectfield', 'select', 'select a color', '23');//here 23 is the internal id of my list
respnose.writePage(form);
}
or you could generate you own field's dynamically using the addSelectOption() function.
var start = function(request, response)
{
var form = nlapiCreateForm('Custom Form');
var myselectfield = form.addField('custpage_selectfield', 'select', 'select a color');
myselectfield.addSelectOption('1', 'Red');//Here 1, 2 and 3 are the id's
myselectfield.addSelectOption('2', 'Green');//which are returned when the
myselectfield.addSelectOption('3', 'Blue');//form is submitted
respnose.writePage(form);
}
I solved this by creating two fields. One is created in the RecordType and will store the info. I set this as hidden. The next field, with the custom dropdown is added in user event. I then process data for my custom dynamic select list and add that to my added user event field.
Then in my change event, I set the record type field to the value selected in my dynamically added field.
Userevent
function userEventBeforeLoad(type, form, request){
if(type == "edit"){
form.addField('custpage_referencecode','select','Reference Code',null, null)
}
}
In my Client Script:
function clientFieldChanged(type, name, linenum){
if(name == 'custpage_referencecode'){
//obtain the upper case value
var codetext = nlapiGetFieldValue(name)
//make sure it hasn't been set
if (codetext != nlapiGetFieldValue('custrecord_rulereferencecode'))
{
nlapiSetFieldValue('custrecord_rulereferencecode', codetext );
}
}
return true
}
There is one customized entity named as "Add to Campaign" . Since there is no default "Email" button in sub-grid , so i placed one customized button and provided javascript to open Email form , and the Email form opens good.
But now the problem is , cant able to get selected records "Email field" in "Send to field" in Email Form.
so how to get selected record email to be displaced in "Email Form"
Open the email form with parameters:
Xrm.Utility.openEntityForm("email", null, param);
var param = {}; // passed as parameters to the new email form
if(Xrm.Page.getAttribute("-- LogicalNameOfField --") // make sure that the field has a value
param["-- LogicalNameOfFieldInNewEmail --"] = Xrm.Page.getAttribute("-- LogicalNameOfField --"); // passes a field value to the new form
// This passes a lookup field as a parameter to the new form
if(Xrm.Page.getAttribute("-- LogicalNameOfLookup --").getValue() != null) { // make sure that the lookup field is not empty or we will have a problem trying to access [0].id and [0].name
param["-- LogicalNameofLooupFieldInEmail --"] = Xrm.Page.getAttribute("-- LogicalNameOfLookup --").getValue()[0].id;
param["-- LogicalNameOfLookup --" + "name" (eg. "accountname")] = Xrm.Page.getAttribute("-- LogicalNameOfLookup --"].getValue()[0].name;
Xrm.Utility.OpenEntityForm("LogicalEntityName", null, param); // open the form and pass parameters
Take note of how the lookup field is passed as a parameters:
2 parameters are passed for each lookup field
The GUID as the name of the lookup field (account if account if the name of the lookup field in the new email)
The name of the lookup in the source entity as a special parameter (accountname)
Note: there is no field called "accountname", but there is a field called "account" in this hypothetical entity