I have the following process. The process Finds a specific set of SMA_Renewal objects. With each object found I then create a Contact_Activity with some of the values in Contact_Activity populated with values from SMA_Renewal object.
Here is the problem. All of the values are being updated to the Contact_Activity object with the correct values except for those values that are being assigned to the Contact_Activity.Description field. The values in this field are from one of the SMA_Renewal objects being repeated to all of the Contact_Activity records I create.
I have looked at the log and I see that this process is applying the same values (wrong) across all of the Contact_Activity records I create. If you take a look you will see that I assign Contact_Activity.Due_Date = SMA_Renewal.Renewal_End_Date. This works fine. I also concatenate this value within the Contact_Activity.Description and it is incorrect.
Also, I have confirmed that if I just simplify the assignment of Contact_Activity.Description to any one of the attributes it works fine. It is just an issue when I try to concatenate a literal. For example, doing this "Contact_Activity.Description=SMA_Renewal.CO + '-' + SMA_Renewal.COLine" results in the same values being repeated.
PROCESS:
If COUNT SMA_Renewal WHERE (SMA_Renewal.Status='Active' AND DATE_ADD(SMA_Renewal.Renewal_End_Date,-45)<=Current_Date AND SMA_Renewal.ContactActivityTimeStamp = UNDEFINED)>0 Then
FIND SMA_Renewal WHERE SMA_Renewal.Status='Active' AND DATE_ADD(SMA_Renewal.Renewal_End_Date,-45)<=Current_Date AND SMA_Renewal.ContactActivityTimeStamp = UNDEFINED
FIND Ref_Activity_Type WHERE Ref_Activity_Type.Code='SMA'
CREATE Contact_Activity FOR EACH SMA_Renewal WITH Contact_Activity.Date=Current_Date,Contact_Activity.Date_Due=SMA_Renewal.Renewal_End_Date,Contact_Activity.X_Contact=SMA_Renewal.X_Contact,Contact_Activity.Description='SMA Renewal: ' + SMA_Renewal.CO + '-' + SMA_Renewal.COLine + ' expiring ' +SMA_Renewal.Renewal_End_Date,Contact_Activity.X_Ref_Activity_Type=ThisRef_Activity_Type
SMA_Renewal.ContactActivityTimeStamp=CURRENT_TIMESTAMP