Question

How can we display the field value when creating a copied project?

  • 29 February 2024
  • 0 replies
  • 24 views

Userlevel 5
Badge +1

Hi Team,

 

I would like the address and start date to be displayed when I create a copied project. In Acumatica, all fields are copied, but the PM site address and start date in the task tab remain blank.

I have tried the code below,

 

  public void OnCopyPasteTasksInserted(ProjectEntry target, Dictionary<Int32, Int32> taskMap, OnCopyPasteTasksInsertedDelegate baseMethod)

  {
      ProjectEntry_Extension graphExt = target.GetExtension<ProjectEntry_Extension>();

   PMSiteAddress SiteAddressRecord = graphExt.Site_Address.Insert();

 PMTask taskRecord = graphExt.Base.Tasks.Insert();

 

 if (Base.Site_Address.SelectSingle() != null)
 {
     SiteAddressRecord.AddressLine1 = Site_Address.SelectSingle().AddressLine1;
     SiteAddressRecord.City = Site_Address.SelectSingle().City;
     graphExt.Site_Address.Update(SiteAddressRecord);
 }

 foreach (PMTask task in Base.Tasks.Select())
 {
     if (Base.Tasks.SelectSingle() != null)
     {
         taskRecord.StartDate = Base.Tasks.Current.StartDate;
         graphExt.Base.Tasks.Update(taskRecord);
     }
 }

        baseMethod(target, taskMap);
    
}

 

but I still haven't found a solution. Please let us know if you have any solutions for this issue.

 

 


0 replies

Be the first to reply!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved