Skip to main content
Answer

Pass value of custom field from Opportunity to Quote to Sales Order?

  • February 23, 2023
  • 4 replies
  • 325 views

Forum|alt.badge.img

Hello. I’ve googled quite a bit and could for the life of me not figure out how to pass values from

CROpportunity → CR Quote
         I                           I

 Sales Order         Sales Order

I found this code https://stackoverflow.com/questions/36156112/how-to-pass-custom-field-vales-from-opportunity-to-sales-order to copy fields from CR Opportunity to Sales Order but if i try this i get a error message.

'CROpportunity' is an ambiguous reference between 'PX.Objects.CR.CROpportunity' and 'PX.Objects.CR.Standalone.CROpportunity'

I'm not sure if this code is functional for my needs. We added several fields on a new Tab in the Opportunity screen that we would need to transfer.

Although I've successfully created a method to transfer fields from Sales Order to Shipment and Invoice, I haven't been able to locate any code examples for the task at hand.

Best answer by Dmitrii Naumov

@jwestermann17 yes, this place and other places where CROpportunity is mentioned.

 

But to be honest, I’d recommend to complete some C# trainings first.

4 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • February 23, 2023

If you get the error message about ambiguous reference, please specify the full class name for the objects causing the error, e.g. PX.Objects.CR.CROpportunity


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • February 23, 2023

Where would I do that in the Code provided by Kurt Bauer?

Here?

 

public PXAction<CROpportunity>

 

 


Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • Answer
  • February 23, 2023

@jwestermann17 yes, this place and other places where CROpportunity is mentioned.

 

But to be honest, I’d recommend to complete some C# trainings first.


mvolshteyn
Acumatica Moderator
Forum|alt.badge.img+3
  • Technical Account Manager in the ISV Team
  • December 11, 2024

Please notice the new article 

 about this question. It basically contains the same idea as the mentioned stackoverflow code, but extension definition is updated.