I am no exeprt yet, but spent the last days on CustomActions and REST because the New Library View has nothing SharePoint left but CustomActions (and no JSOM on the page it for creating/changing them)
There are two types of CustomActions/Scriptlinks involved here:
Type 2 = Site(Collection) Executes on every page inside the SiteCollection
Type 3 = Web Executes on every page inside the Web it was created (not in its subsites!!)
So the endpoint you use determines what you create and where it gets executed
Built your endpoint with
(2 and 3 are internal numbers, I don't know what 1 may be, Farm?)
I have 2 CustomActions in the Root of the SiteCollection:
Both get executed
Reading all CustomActions in the Web:
The WEB CustomActions from the parent site are NOT executed.
These (sub)WEB CustomActions where NOT executed on the parent.
- the Sequence number determines the load/exeution order.. lower numbers first (in screenshot Sequence should be 10 and not 1, it is a later screenshot taken)
- you can create UPPERCASE names, but the call will be lowercase (as IIS is not case sensitive no problem; but external links must be lowercase files.
- yes, CustomActions you set on non-New-Library-View pages with JSOM or Powershell are fired on the View page (But lets not call it a View page, as it is not a WebPart View)
REST syntax for creating CustomActions: