Skip to main content
Question

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

  • 29 February 2024
  • 0 replies
  • 24 views

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.

 

 

Be the first to reply!

Reply