DynCon365 / SharePointDragAndDropPCF

A PCF control to drag and drop files to SharePoint libraries.
MIT License
8 stars 4 forks source link

The requested record was not found or you do not have sufficient permissions to view it. #4

Open gaarabyakuya opened 3 years ago

gaarabyakuya commented 3 years ago

I keep getting this error "The requested record was not found or you do not have sufficient permissions to view it." I already re do the app several times, I change the SP guid. thanks in advance

anupamkhasia commented 3 years ago

@gaarabyakuya - you need to place "Sharepoint site record Id" from CRM not sharepoint site GUID . I have same error and resolved it by placing sharepoint site record Id.

Let me know if it works.

gaarabyakuya commented 3 years ago

@anupamkhasia Thank you, that indeed solve that error. Could tell me how did you map the fields? because the control keeps saying loading and nothing happens. I tried any combination that I can think of but no luck.

anupamkhasia commented 3 years ago

@gaarabyakuya - I am also still trying to load control as it looks there are additional sharepoint permissions needs to be given .

ThoshanTharanga commented 3 years ago

@anupamkhasia have you find any solution for file loading issue? For me also it keeps loading nothing happen...

anupamkhasia commented 3 years ago

@ThoshanTharanga - Yes , we have to configure sharepoint site and than you will be able to use this component. Let me know if you are facing any other errors.

ThoshanTharanga commented 3 years ago

@anupamkhasia Thanks for the reply.... Could I know what kind of configuration needs to be done there..... seems it is giving error when retrieving the sharepoint folder on onFileDropped funtion. image

SharePoint setup mean, is it kind of setting up permission..? Thanks :)

anupamkhasia commented 3 years ago

@ThoshanTharanga - I mean to have dynamics crm and sharepoint integration configuration we need to do. please refer to following link

https://www.crmsoftwareblog.com/2020/02/how-to-setup-a-dynamics-365-integration-with-sharepoint/

Let me know if you have done this.

Thanks Anupam

ThoshanTharanga commented 3 years ago

@anupamkhasia Yeah that integration part is done and selected the based on entity as Account. Still it keep loading... and can see the console error which I have mentioned previously. Thanks, Thoshan

anupamkhasia commented 3 years ago

@ThoshanTharanga - can you give me screenshot of PCF control configuration you have setup ?

ThoshanTharanga commented 3 years ago

@anupamkhasia Sure... for the client id I have given the client id of the app which I have registered in Azure App Directory and for the site id I have given the "sharepointsiteid" field from api/data/v9.0/sharepointsites response. image image

anupamkhasia commented 3 years ago

@ThoshanTharanga - not sure and can not determine how to look into your error but here is my configuration . please try this and let know. image

kshitijkhanna commented 3 years ago

Hello @ThoshanTharanga @anupamkhasia : I am facing same issue. We're you able to get this working?

ThoshanTharanga commented 3 years ago

HI @kshitijkhanna . Yes, this error is coming because sometimes the input we passing as a parameter in getSharePointFolderName() funtion is undefined in SharePointUploadControlIVM.ts file. Could you try by adding below change to it? image

if this fix work for you, I will create a PR to that change.

Thank you :)

kshitijkhanna commented 3 years ago

Hi @ThoshanTharanga :- Thanks ! The code change works and we are able to upload documents however its does not pick the Title before the folder name and creates folder with just ID( _2DA820A3E83BEC118C620012476F46B0 ).

We get the below console error for GET.

https://xyz.sharepoint.com/sites/abc/_api/web/getFolderByServerRelativePath(decodedUrl='abcd%2F_2DA820A3E83BEC118C620012476F46B0')

For a normal documents control, it does pickup Title before the ID and creates it properly.

kdot088 commented 1 year ago

HI @kshitijkhanna . Yes, this error is coming because sometimes the input we passing as a parameter in getSharePointFolderName() funtion is undefined in SharePointUploadControlIVM.ts file. Could you try by adding below change to it? image

if this fix work for you, I will create a PR to that change.

Thank you :)

Hi, I am also having the same issue and tried this code. unfortunately it doesn't work. do you have any idea why? I am still getting the same 'replace' error.

kdot088 commented 1 year ago
zz
NataliWinOn365 commented 1 year ago

Did anybody solved all the errors? :)

Maza95 commented 10 months ago

Hello, please can any one tell me how i can import the solution i downloaded the repository and then i run npm install and then npm fix after that pac pcf push command but it didnt work. I also tried to build the project butit gave me the same results. can anyone help me please with the steps after downloading the repo.

thanks a lot Best regards