Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 18 2019 13:42
    patrick-rodgers closed #830
  • Jun 18 2019 13:42
    patrick-rodgers opened #830
  • Jul 10 2018 12:58
    patrick-rodgers closed #751
  • Jul 10 2018 12:58
    patrick-rodgers closed #753
  • Jul 10 2018 12:58
    patrick-rodgers closed #758
  • Jul 10 2018 12:57
    patrick-rodgers closed #815
  • Jul 10 2018 12:57
    patrick-rodgers closed #823
  • Jul 10 2018 12:57
    patrick-rodgers closed #824
  • Jul 10 2018 12:57
    patrick-rodgers closed #825
  • Jul 10 2018 12:57
    patrick-rodgers closed #829
  • Jul 10 2018 12:57
    patrick-rodgers commented #829
  • Jul 10 2018 11:06
    Mike-tech opened #829
  • Jul 06 2018 18:26
    koltyakov labeled #828
  • Jul 06 2018 18:21
    ken-harris commented #828
  • Jul 06 2018 18:21
    ken-harris closed #828
  • Jul 06 2018 17:51
    koltyakov labeled #828
  • Jul 06 2018 17:51
    koltyakov commented #828
  • Jul 06 2018 14:23
    ken-harris opened #828
  • Jul 06 2018 13:18
    koltyakov labeled #827
  • Jul 06 2018 13:18
    koltyakov labeled #827
himyulian
@himyulian
Hi, can pnpjs update field in list, without starts workflow onchange element?
Russell gove
@russgove
regarding my issue about not being able to open a doclib with spd. i had the default view set to show 1 item (filtered by Id =1), Opened a ticket with MS support. Got a callback that they found the root cause, and now i can open my library in SPD. I have asked what they found , but not heard back yet.
Kemal Sinanagic
@KEMiCZA
AFAIK if you open the list in modern experience SharePoint will automatically index the necessary columns for you. Maybe something went wrong with the auto-indexing
@himyulian Try validateUpdateListItem instead of update
Andrew Koltyakov
@koltyakov
Yeah, some Andrew guy... :D
Eirik Brandtzæg
@eirikb
:D
robiharid
@robiharid
hey any1 here
i have a list with a Person field, but when I grab that item it doesnt show me the Author or Person
robiharid
@robiharid
I have the column 'contact' set to Person type but it wont show up, even .select('contact') 404s me
hey again @koltyakov
Andrew Koltyakov
@koltyakov
Hey @robiharid
And it won't. Lookups are not shown this way. Lookup entity which is expose by default follow the following pattern: NameId. When you need some of the props of lookup you need to expand it and select at least one prop. .select('Person/Id').expand('Person')
People fields behave exactly the same as lookups.
robiharid
@robiharid
thanks @koltyakov , the nameId was hidden due to the dispalyname -> internal name remap that you wrote
can i do .select('contact/').expand('contact')
to expose all the fields of the contact
Andrew Koltyakov
@koltyakov
Nope, only explicit names are allowed. Sometimes * wildcard works in OData, but it’s not the case with expanded lookup props.
robiharid
@robiharid
@koltyakov where do i find the OData Person lookup values? I was using this post - https://ajaznusrat.wordpress.com/2012/06/21/using-the-sharepoint-user-type-field-people-or-group-in-list-definition/
But I am just tryign to find the img of the person, NameWithPicture seems to be deprecated?
robiharid
@robiharid
I can do a graph call, but I would have to do 30 seperate graph api calls to get everyones picture lol https://graph.microsoft.com/v1.0/users/email/photo/$value
i can do .select(*, contact/EMail) to get all other properties which is awesome :)
robiharid
@robiharid
any one worked with files? trying to access the download url / interactivew preview propertry, serverrelativeembeduri is not there
image.png
@koltyakov ?
himyulian
@himyulian

@himyulian Try validateUpdateListItem instead of update

const { Author: { Name }, Created: Modified } = await item.select('Created,Author/Name').expand('Author').get();

  const sysUpdateData = [
    { FieldName: 'Editor', FieldValue: loginToFormString(Name) },
    { FieldName: 'Modified', FieldValue: dateToFormString(new Date(Modified)) }
  ];

in sysUpdateData the Editor and Modified fields are updated.
Why then the line above are taken fields Author and Created ?

Andrew Koltyakov
@koltyakov
validateUpdateListItem is not the system update, but using it you can recreate something similar, but not the same, for the same the JSOM's systemUpdate should be used
Eirik Brandtzæg
@eirikb
SharePoint API keeps giving me nullpointers, should I mention this to them (you?) somehow?
status office says all is fine. I saw this: https://twitter.com/MSFT365Status/status/1196397308507807744 but the nullpointers have been going on for days on several of my customer tenants
Andrew Koltyakov
@koltyakov
Looks that many tenants affected with the issue https://github.com/SharePoint/PnP-Sites-Core/issues/2439#issuecomment-555420075, I have a feeling this is connected.
Eirik Brandtzæg
@eirikb
Nice find. Looks very connected indeed
Andrew Koltyakov
@koltyakov
We also face nullpointers in REST API, btw. Intermittent errors. My guess that during promotion of the update, it's not yet delivered to all WFE and and so the correct request can end up being sent to different versions of the APIs.
himyulian
@himyulian
@koltyakov Hi Andrew. I'm using VaidateUpdateListItem. SP2013 on-prem in Russian localization (Moscaw time). What date format should be? Tried different formats ('dd.MM.yyyy H:mm:ss', 'd/M/yyyy H:m a'), but in any case, why does the workflow on-change triggered? Although the Modified Editor fields remain unchanged.
Andrew Koltyakov
@koltyakov
Format is different based on Web time settings, unfortunately. For ru-RU it's should be 'DD.MM.YYYY' for date only and 'DD.MM.YYYY H:mm' correspondingly. VaidateUpdateListItem is not the same as SystemUpdate and some internal triggers, especially for whose legacy as WF is, might happen anyways.
himyulian
@himyulian
That is, in order for the workflow not to fire when an item changes, do I need to use JSOM systemUpdate?
If I only use React/Angular/Vue html pages without using SP context, I just need to load sp.js to use the JSOM ?
Andrew Koltyakov
@koltyakov
There was no SystemUpdate in CSOM in 2013, as I can recall, it appeared only in SPO when 2019.
The option is not using WFs =)) Or trigger a WF explicitly, or compare something with something in metadata and stop a WF under some logical circumstances.
himyulian
@himyulian
@koltyakov Ok, thanks.
Ryan
@Doogibo_gitlab
Does anyone know of a solution for getting batch jobs/scheduled tasks to run against a SP site behind ADFS authentication? Users in 2010 were able to use automated scripts to download files, etc. very easily by just hard coding credentials in the script. With ADFS, I can't find any guides on automated ways to get tokens/make requests against sites. Apparently not possible in SQL jobs, but maybe PowerShell? Thanks!
Sergei Sergeev
@s-KaiNet
@Doogibo_gitlab you can use AuthenticationManager and GetADFSUserNameMixedAuthenticatedContext method from PnP-Sites-Core .net library
Andrew Koltyakov
@koltyakov
node-sp-auth and tools based on it support ADFS auth as well
e.g. https://github.com/SharePoint-NodeJS/pnp-auth & PnPjs & Node.js and here we're go
it depends on tech and lang preferences
yet, as this chat is PnPjs related, I assume Node.js is in preference =)
Sergei Sergeev
@s-KaiNet
with .net it will be a lot faster (development), but if you are a nodejs fan, then why not... :))
Andrew Koltyakov
@koltyakov
@s-KaiNet you're moving back to "dark" side of .Net =)
Sergei Sergeev
@s-KaiNet
:)
I'm not sure what is SQL jobs, but I guess that's SSIS packages. There you can send http requests using c# code, that's why I suggested .net :)
Ryan
@Doogibo_gitlab
Thanks so much for the suggestions!
Tarun Dhillon
@tarundhillon

Hello - I am trying to add multiple columns to a list using inBatch

addColumn(lists: { Title: string }, cols: { name: string, type: string }[]) {

//cols = [{name:'ListID', type: 'Text'}, {name:'Notes', type: 'TextArea'},


   const batch = sp.web.createBatch();
    let listItem = sp.web.lists.getByTitle(list.Title).fields.inBatch(batch);
    cols.forEach(col => {
      switch (col.type) {
        case 'Text': listItem.addText(col.name).catch(console.warn); break;
        case 'TextArea': listItem.addMultilineText(col.name, 10, false).catch(console.warn); break;
        case 'Date': listItem.addDateTime(col.name).catch(console.warn); break;
        default: listItem.inBatch(batch).addText(col.name).catch(console.warn); 
      }
    });

    return from(batch.execute()); // using Rxjs to convert promise to Observable    
  }

But I keep getting the below error for each field. I have referred #217 & #263. Any suggestions on what is going wrong here ?

zone-evergreen.js:359 Error: Error making HttpClient request in queryable [400] Bad Request ::> {"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"Invalid request."}}}

Eirik Brandtzæg
@eirikb
Hi, is it possible to make pnp work with https://github.com/sindresorhus/got ?
Currently it does not work because I use $pnp/nodejs, which again require https-proxy-agent, and this (for some reason) causes got to crash
Eirik Brandtzæg
@eirikb
It would be nice if it was possible to use the authentication-flow, but pass in a proxy for fetching
Eirik Brandtzæg
@eirikb
The reason I ask is because I keep getting errors from SharePoint API, a lot, and usually a retry is all I need - and by default node-fetch won't do this