#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
Add field Selector to mobile app
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
}
}
}
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.