Hi Experts,
Scenario : I have requirement to copy some fields ( Activity ID , Subject , Notes etc) from standard activity ( Phone Call , Appointment , Task etc) into my custom business object node level data .
Issue : How to Copy Notes field from standard activity into my custom activity Notes fields my custom business object sample definition
businessobject BOCustomActivity {
[Label("Description")] element Descr : LANGUAGEINDEPENDENT_LONG_Text;
[Label("Start Date")] element StartDate : Date;
[Label("End Date")] element EndDate : Date;
node Cust_Act_send [0,n] {
[Label("Activity ID")] element ActID : BusinessTransactionDocumentID;
[Label("Activity Subject")] element ActName : EXTENDED_Name;
[Label("Activity Type")] element ActType : LANGUAGEINDEPENDENT_MEDIUM_Text;
[DependentObject(TextCollection)] node myNode;
}
action UpdateData;
}
In the above business object under the node level i can assign the Activity ID, Activity Subject , Activity Type from standard activity using Query and update the node level records,
But I want to assign Notes ( TextCollection Text ) from standard activity notes fields.
In the below screen we have 2 records from standard phone call activity.
![121Capture.JPG]()
I am using the below code to get the record from standard phone call activity.
import ABSL;
import AP.FO.Activity.Global;
var noderef : elementsof BOCustomActivity.Cust_Act_send;
var nodeins;
var query = PhoneCallActivity.QueryByElements;
var resultData = query.Execute();
// 2. Selection
var selectionParams = query.CreateSelectionParams();
selectionParams.Add(query.ID.content, "I", "BT", "2551", "2555");
// Result
resultData = query.Execute(selectionParams);
foreach ( var record in resultData)
{
noderef.ActID = record.ID;
noderef.ActName.content = record.Name.content;
noderef.ActType = record.TypeCode.GetDescription();
(?) = record.TextCollection.Text.TextContent.GetFirst().Text.content
nodeins = this.Attachment.Create(noderef);
}
in the above code the Activity ID , Activity Name , Activity Type but how to copy the Notes ( TextCollection Text ) into the node element myNode (TextCollection) and assign and update on node level element .
I have check the post : Copy DependentObject TextCollection or AttachmentFolder
But did not solve the issue.
Please anyone have idea about the above requirement.
IF anyone want more explanation kindly let me know.
Many Thanks,
Mithun