Skip to main content
Answer

Add field Selector to mobile app

  • December 10, 2025
  • 1 reply
  • 9 views

Forum|alt.badge.img+1

#region UsrContactID
        public abstract class usrContactID : BqlInt.Field<usrContactID> { }
        [PXDBInt()]
        [PXSelector(typeof(Search<Contact.contactID,
            Where<Contact.bAccountID, Equal<Current<FSEquipment.ownerID>>,
                And<Contact.isActive, Equal<True>,
                And<Contact.contactType, Equal<ContactTypesAttribute.person>,
                And<Match<Current<AccessInfo.userName>>>>>>>),
            new Type[]
            {
                typeof(Contact.displayName), typeof(Contact.salutation), typeof(Contact.eMail), typeof(Contact.phone1)
            },
            SubstituteKey = typeof(Contact.displayName)
        )]
        [PXFormula(typeof(Default<FSEquipment.ownerType>))]
        [PXUIEnabled(typeof(Where<FSEquipment.ownerID, IsNotNull>))]
        [PXUIVisible(typeof(Where<FSEquipment.ownerType, Equal<ListField_OwnerType_Equipment.Customer>>))]
        [PXUIField(DisplayName = Messages.Contact)]
        [PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]
        public Int32? UsrContactID { get; set; }
        #endregion
update screen FS205000 {
update container "EquipmentRecords"{
remove layout "CustomerOwnerLine"
add field "OwnerType"{
placeAfter layout "TargetEquipmentLine"  
}
add layout "CustomerOwnerContactLine"{
displayName = "CustomerOwnerContactLine"
layout = "Inline"
placeAfter field "OwnerType"
 add field "UsrContactID" {
        special = AllowEdit
        selectorDisplayFormat = KeyDescription
        pickerType = Searchable
        selector {
          fieldsToShow = 2
          add field "ContactID"     
          add field "DisplayName" {
            listDisplayFormat = CaptionValue
          }
        }
      }
    }
  }
}

My field not add to fom on mobile

Best answer by bihalivan15

add layout "CustomerOwnerContactLine"{
displayName = "CustomerOwnerContactLine"
layout = "Inline"
placeAfter field "OwnerType"
add field "CustomerOwnerID" {
        special = AllowEdit
        selectorDisplayFormat = KeyDescription
        pickerType = Searchable
        selector {
          fieldsToShow = 2
          add field "CustomerID"
          add field "CustomerName" {
            listDisplayFormat = CaptionValue
          }
        }
      }
 add field "Contact" {
        special = AllowEdit
        selectorDisplayFormat = KeyDescription
        pickerType = Searchable
        selector {
          fieldsToShow = 2
          add field "ContactID"     
          add field "DisplayName" {
            listDisplayFormat = CaptionValue
          }
        }
      }
    }  

1 reply

Forum|alt.badge.img+1
  • Author
  • Pro I
  • Answer
  • December 10, 2025

add layout "CustomerOwnerContactLine"{
displayName = "CustomerOwnerContactLine"
layout = "Inline"
placeAfter field "OwnerType"
add field "CustomerOwnerID" {
        special = AllowEdit
        selectorDisplayFormat = KeyDescription
        pickerType = Searchable
        selector {
          fieldsToShow = 2
          add field "CustomerID"
          add field "CustomerName" {
            listDisplayFormat = CaptionValue
          }
        }
      }
 add field "Contact" {
        special = AllowEdit
        selectorDisplayFormat = KeyDescription
        pickerType = Searchable
        selector {
          fieldsToShow = 2
          add field "ContactID"     
          add field "DisplayName" {
            listDisplayFormat = CaptionValue
          }
        }
      }
    }