You need to sign in to do that
Don't have an account?
golu
Hi,
I want to pass the activityIds returned as a parameter to createCommunicatOHistory method. How can i do it?
passing parameters from one method to another apex
public static void createCommunicatOHistory(List<Id> activityIds, ){ } public static List<Id> createSalesforceActivities(List<Id> recordIdSet ,String message, Datetime scheduleDateTime, String status){ List<Task> lstTask = new List<Task>(); for(String id: recordIdSet){ Task taskObj = new Task(); taskObj.ActivityDate = Date.valueOf(scheduleDateTime); taskObj.Status = status; taskObj.Description = message; taskObj.WhoId = id; lstTask.add(taskObj); } insert lstTask; List <id> activityIds = new List<Id>(); if(lstTask.size()>0){ for(Task t : lstTask){ activityIds.add(t.id); } } return activityIds; }
Hi,
I want to pass the activityIds returned as a parameter to createCommunicatOHistory method. How can i do it?
All Answers
I hope you find the above solution helpful. If it does mark as best answer to help others too.
Thanks,
Ramesh D
Try the below code it works fine. I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi