Fixed – “The relative url contains invalid characters. Please use a different name. Valid relative url names cannot ends with the following strings: .aspx, .ashx, .asmx, .svc , cannot begin or end with a dot, cannot contain consecutive dots and cannot contain any of the following characters: ~ ” # % & * : ? / \ { | }. “ error while creating SharePoint Document Location – Dynamics 365 / Dataverse

We were using the below code to create a sharepointdoucmentlocation record through a C# Console App. For folderName we were using the below format, similar to what CRM does, when someone opens the document tab for the record, to create the sharepointdocument location record. {name} + “_” + {GUID} However, while creating one particular record … Continue reading “Fixed – “The relative…

Continue Reading Nishant Rana’s Article on their blog

Fixed – “The relative url contains invalid characters. Please use a different name. Valid relative url names cannot ends with the following strings: .aspx, .ashx, .asmx, .svc , cannot begin or end with a dot, cannot contain consecutive dots and cannot contain any of the following characters: ~ ” # % & * : ? / { | }. ” error while creating SharePoint Document Location – Dynamics 365 / Dataverse

We were using the below code to create a sharepointdoucmentlocation record through a C# Console App. private void CreateAssociateSharePointDocumentLocation(string folderName, Guid recordGuid, ServiceClient serviceClient) { var documentLocation = new Entity(“sharepointdocumentlocation”); documentLocation[“name”] = “Documents on Default Site 1”; documentLocation[“relativeurl”] = folderName; documentLocation[“parentsiteorlocation”] = new EntityReference(“sharepointdocumentlocation”, new Guid(parentSiteorLocation)); documentLocation[“regardingobjectid”] = new EntityReference(“schemanametable”, recordGuid); serviceClient.Create(documentLocation); } For folderName…

Blog Syndicated with Nishant Rana’s Permission

More About This Author

Nishant Rana

Author: Nishant Rana

Share This Post On