< Back

Add-CrmNoteToCrmRecord

Sat Jan 18, 2020 3:57 pm

NAME Add-CrmNoteToCrmRecord



SYNOPSIS

Create a new note (annotation) to a record.





SYNTAX

Add-CrmNoteToCrmRecord [-conn <CrmServiceClient>] [-CrmRecord] <PSObject> [-Subject] <String> [-NoteText] <String>

[<CommonParameters>]



Add-CrmNoteToCrmRecord [-conn <CrmServiceClient>] [-EntityLogicalName] <String> [-Id] <Guid> [-Subject] <String>

[-NoteText] <String> [<CommonParameters>]





DESCRIPTION

The Add-CrmNoteToCrmRecord cmdlet lets you add a note (annotation) to a record.



There are two ways to specify a target record.



1. Pass EntityLogicalName and record's Id.

2. Get a record object by using Get-CrmRecord/Get-CrmRecords cmdlets, and pass it.



You can specify note subject and body by using -Subject and -NoteText parameters





PARAMETERS

-conn <CrmServiceClient>

A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-CrmRecord <PSObject>

A record object which is obtained via Get-CrmRecord/Get-CrmRecords. When you pass CrmRecord, then you don't

use EntityLogicalName/Id.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Subject <String>

Subject of a note (annotation).



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-NoteText <String>

Body Text of a note (annotation).



Required? true

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-EntityLogicalName <String>

A logicalname of the target record. i.e.)accout, contact, lead, etc..



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Id <Guid>

An Id (guid) of the record



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS









OUTPUTS









NOTES









-------------------------- Example 1 --------------------------



Add-CrmNote -conn $conn -EntityLogicalName account -Id 00005a70-6317-e511-80da-c4346bc43d94 -Subject "sample

subject" -NoteText "sample body"



This example add a note (annotation) to an account record.







-------------------------- Example 2 --------------------------



Add-CrmNote account 00005a70-6317-e511-80da-c4346bc43d94 "sample subject" "sample body"



This example add a note (annotation) to an account record by ommiting parameters names.

When ommiting parameter names, you do not provide $conn, cmdlets automatically finds it.









RELATED LINKS