Skip to main content
Question

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


Sagar Greytrix
Captain II
Forum|alt.badge.img+3

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings