Hi All,
I’m getting the below error in Service Order screen,
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
please assist.
Best answer by aaghaei
View original
Hi All,
I’m getting the below error in Service Order screen,
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
please assist.
Best answer by aaghaei
View originalHello
More information is needed, please.
Thank you!
Hi All,
I’m getting the below error in Service Order screen,
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
please assist.
Hi
This is most likely due to a customization or lack of a customization that the screen is looking for.
If there are NO any ISV customizations; Please unpublished all customizations and see if the issue persists.
If issue still persists or if you have any ISV customizations I suggest you to create support case on Acumatica (With access) as this error should be investigate further.
Thanks!
Hi
Yes, I’m trying to customize service order screen.
I’m trying to add column AddressLine1 and AddressLine2 to the existing selector Location Field in Service order screen from Customer Location screen(AR303020).
here is my code and not getting any error in Visual studio,
kindly assist if anything I’m missing/wrong in my code.
The below code will do the work for you. You can add more fields to the selector following this footstep:
using PX.Data;
using PX.Objects.CR;
using PX.Objects.CS;
namespace PX.Objects.FS
{
[PXNonInstantiatedExtension]
public sealed class USRFSServiceOrderExt : PXCacheExtension<PX.Objects.FS.FSServiceOrder>
{
public static bool IsActive() => true;
#region LocationID
[PXMergeAttributes(Method = MergeMethod.Merge)]
[PXSelector(typeof(Search2<Location.locationID,
LeftJoin<Address, On<Address.addressID, Equal<Location.defAddressID>>>,
Where<Location.bAccountID, Equal<Current<FSServiceOrder.customerID>>,
And<Location.isActive, Equal<True>,
And<MatchWithBranch<Location.cBranchID>>>>>),
typeof(Location.locationCD),
typeof(Location.descr),
typeof(Address.addressLine1),
typeof(Address.addressLine2),
typeof(Address.addressLine3),
SubstituteKey = typeof(Location.locationCD),
DescriptionField = typeof(Location.descr))]
public int? LocationID { get; set; }
#endregion
}
}
And this is the screenshot from the Location Selector:
If you still face error after this change, you may have issues elsewhere.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.