MS Planner – Plans – Get Plan Task From Task Items

Estimated reading: 3 minutes

MS Planner – Plans – Get Plan Task From Task Items

Get a Planner plan task from a collection of tasks by id.

Action details

PropertyValue
Action labelMS Planner – Plans – Get Plan Task From Task Items
CategoryCloudTools
Apex class and methodGetMSPlannerPlanTaskById.getPlanTaskById
Input typeGetMSPlannerPlanTaskById.GetMSPlannerPlanTaskByIdInput
Output typeList<MSPlannerTask>
AuthorizationNo connection required; searches an existing collection.

Prerequisites and permissions

Retrieve the collection first and pass its matching model type. This action performs no callout and needs no connector or Microsoft permissions of its own.

Inputs

InputApex fieldTypeRequiredDescription
IdidStringYesTask id to find
ItemsitemsList<MSPlannerTask>YesTasks to search

Outputs

Returns one result for each request, preserving order. A missing match, blank ID, null collection, or null request yields null. A null or empty request list returns a single null element. The helper selects the first non-null item whose id matches.

OutputApex fieldTypeDescription
IdidStringPlanner task identifier
Plan IdplanIdStringPlanner plan identifier
Bucket IdbucketIdStringPlanner bucket identifier
TitletitleStringPlanner task title
Order HintorderHintStringSort hint used by Planner
Assignee PriorityassigneePriorityStringAssignee priority sort hint
Percent CompletepercentCompleteIntegerCompletion percentage 0-100
PrioritypriorityIntegerPlanner priority value
Has DescriptionhasDescriptionBooleanWhether task has description details
Conversation Thread IdconversationThreadIdStringConversation thread identifier
Created Date TimecreatedDateTimeStringCreated timestamp
Start Date TimestartDateTimeStringStart timestamp
Due Date TimedueDateTimeStringDue timestamp
Completed Date TimecompletedDateTimeStringCompletion timestamp
Preview TypepreviewTypeStringPreview type (for example, automatic)
Reference CountreferenceCountIntegerReference count
Checklist Item CountchecklistItemCountIntegerChecklist item count
Active Checklist Item CountactiveChecklistItemCountIntegerActive checklist item count
OData TypeodataTypeStringOData type
OData ETagodataEtagStringOData etag
Additional PropertiesadditionalPropertiesList<DynamicObject>Additional data returned by query

Behavior and limits

plannerAssignments is a public map on the Apex model, not a global invocable field. It is not a subscriber Apex/Flow output. LWC results expose plannerAssignmentsJson as a serialized assignment map.

Use in Flow

Add MS Planner – Plans – Get Plan Task From Task Items in Flow Builder. Pass a previously retrieved collection and the ID to find. Check the returned item for null before using it.

Use in custom Apex

This subscriber-org example uses the Apptigent namespace. Replace the placeholders and check empty or null results. No callout context is needed.

Apptigent.GetMSPlannerPlanTaskById.GetMSPlannerPlanTaskByIdInput request =
    new Apptigent.GetMSPlannerPlanTaskById.GetMSPlannerPlanTaskByIdInput();
request.id = 'REPLACE_WITH_ID';
request.items = new List<Apptigent.MSPlannerTask>{ /* previously retrieved items */ };

List<Apptigent.MSPlannerTask> results =
    Apptigent.GetMSPlannerPlanTaskById.getPlanTaskById(
        new List<Apptigent.GetMSPlannerPlanTaskById.GetMSPlannerPlanTaskByIdInput>{ request }
    );
System.debug(results);

Use in a Lightning Web Component

This collection helper is not exported by msPlannerConnectorLib. For an existing JavaScript collection, use items.find(item => item && item.id === id) || null. This does not call Microsoft Graph.

Error handling and troubleshooting

SymptomWhat to check
Missing matchCheck the ID and collection type; a null match is expected when no item exists.

See Planner connector introduction.

Share this Doc

MS Planner – Plans – Get Plan Task From Task Items

Or copy link

CONTENTS

Free eBook: The Ultimate Guide to Power Platform Custom Connectors

Antimanual

Ask our AI support assistant your questions about our platform, features, and services.

You are offline
Chatbot avatar
What can I help you with?

Subscribe

×
Cancel