By using this website, you agree to our Terms of Use (click here)
Hello Everyone,
Can someone help me to create a new field in the PO called "Project Manager", that will be not editable and will have the owner ID once a project is selected?
I was trying with the following code:
[PXDBString(100)]
[PXDefault(typeof(Select<PMProject, Where<PMProject.ContractID, Equal<Current<POOrder.ProjectID>>>>), SourceField = typeof(PMProject.OwnerID)]
[PXUIField(DisplayName="Project_Manager"))]
But I'm getting these errors:
[2024-07-12 01:09:24.277] \App_Code\Caches\PX_Objects_PO_POOrder_extensions.cs(30): error CS0426: The type name 'ContractID' does not exist in the type 'PMProject'
[2024-07-12 01:09:24.339] \App_Code\Caches\PX_Objects_PO_POOrder_extensions.cs(30): error CS0426: The type name 'ProjectID' does not exist in the type 'POOrder'
[2024-07-12 01:09:24.402] \App_Code\Caches\PX_Objects_PO_POOrder_extensions.cs(30): error CS0426: The type name 'OwnerID' does not exist in the type 'PMProject'
[2024-07-12 01:09:24.480] \App_Code\Caches\PX_Objects_PO_POOrder_extensions.cs(30): error CS0426: The type name 'ContractID' does not exist in the type 'PMProject'
try lower cases on your fields
[PXDefault(typeof(Select<PMProject, Where<PMProject.contractID, Equal<Current<POOrder.projectID>>>>), SourceField = typeof(PMProject.ownerID)]
Thank you that works
