sharepoint online – How do I update a SPFx App in Dev without updating Staging or Prod?

Ok, I did a change in one of my SPFx web parts, incremented the version in package-solution.json file and deployed the app in the app catalog.

In the Dev site I went into the Details for the app, and I saw the new version there and clicked in the Get It button.

I went in the page where the web part is and refreshed the page and it was updated successfully.

However, for my surprise, I went in the production site (in the same tenant) and refreshed the page and the changes were there as well! It was strange because I didn’t go to the Details and clicked in the Get it button in the production site.

How can I have different versions of the same web part in Dev/Stg/Prod?

web part – SPFX JSOM – call a named function from executeQueryAsync

Apologies in advance for the newbie question as I believe this is actually a fairly simple issue. I am using JSOM and in my WebBart.ts file have a named function that queries a list and produces front-end output. It works without issues:

      private PopulateExistingVacancies(): void {
      ...
      }

In a different function (triggered via an event listener), I do an asynchronous call:

    protected FinalizeVacancy(): void {

                context.load(newVacancyListItem);

                // Execute the asynchronous operation and on success update status 
                // and attempt to run additional (pre-defined logic) 
                context.executeQueryAsync(function () {
                    (<HTMLDivElement>(document.getElementById("lblMsgInfo"))).innerText = "New Vacancy entry has been created";
                    this.PopulateExistingVacancies();
                  },
                  function (sender, args) {
                    (<HTMLDivElement>(document.getElementById("lblMsgError"))).innerText =
                      "Error encountered adding new Vacancy entry: " + args.get_message();
                  }
                );

On success, I would like to actually call PopulateExistingVacancies(), but I don’t think this is possible (or at least it won’t work).

So my question is, what is the proper way to call a pre-written function from an anonymous function which is executed upon an asynchronous success?

Thanks in advance.

2016 – Taxonomy Field Values/Filtering with SPFx

Taking a stab at it. Please correct me if I am wrong.

Assuming that you need to fetch all data from a SharePoint list including a taxonomy column, you want to display that data on a page. Also, then you want to provide some sort of filter on that data.

So, the approach for that would be to make a standard REST API call to the list and then store the JSON response. Bind this JSON response to HTML and also provide some sort of filter ( input/textbox maybe ? ) so that user can search within this data.

Make use of the TaxCatchAll column to fetch the term value as below:

private _getListData(): Promise<any> {

 let restEndPoint = this.context.pageContext.site.absoluteUrl + `/_api/web/lists/getbytitle('Documents')/items?
                    $select=Title,ID,Description,TaxonomyColumn,TaxCatchAll/ID,TaxCatchAll/Term
                    &$expand=TaxCatchAll`;

 return this.context.spHttpClient.get(restEndPoint , SPHttpClient.configurations.v1)
   .then((response: SPHttpClientResponse) => {

    response.json().then((responseJSON: any) => {  
          console.log(responseJSON);  

          // foreach value in responseJSON
          // do something or other

          // bind data to html
          // bindData(responseJSON);

        });      
   });
}

You’ll get objects back for TaxonomyColumn, and TaxCatchAll. TaxonomyColumn will have the Term Set object information and TaxCatchAll will have the TaxonomyColumn term values. Here, replace the TaxonomyColumn with your managed metadata column internal name.

Once the JSON is received, you can make a copy of it or store it in a global variable. Assuming an input box for filter, when user enters some keyword, fire up an event to filter this JSON itself.

PS – Since you tagged it 2016 and not SPO, you wont be able to use the shiny new RenderListDataAsStream endpoint which is much more reliable.

Extension option Missing in SPFX

i am trying creating extension but not enter image description heregetting extension option only getting webpart

spfx – Integration of free/open source CMS with SharePoint Online

Stack Exchange Network


Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

sharepoint enterprise – tslint and prettier extension conflicts in SP 2019 SPFx prject

I create Application Customizer for SharePoint 2019 in SPFx and in my VS code, I have the extension Prettier configure
In the tslint project and the nicer conflicts, for example, I below the configuration in pretty
"semi": true,
and below the rule in tslint.config
"no unnecessary semicolons": false,
"semicolon": false,

If I set semi to false, it will remove the semicolon from each line and tslint will start giving an error indicating that the semicolon is missing and if I say semi to true, tslint will start giving me an error for the point- unnecessary point

I don't know how to solve it

Start manual Sharepoint designer workflow using SPFX

Can we create a spfx extension or a web part that can launch a workflow on the selected items in the document library

spfx – internalModuleBaseUrls with –ship

I created spfx webpart, first I made gulp package-solution without calling ship, as mentioned in this article: hhttps: //docs.microsoft.com/en-us/sharepoint/ dev / spfx / web-parts / get-started / serve-your-web-part-in-a-sharepoint-page.

It says that since I did the packaging without shipping, then internalModuleBaseUrls will point to the local host. However, even after the package-solution –ship gulp, it still points to the local host. Is this the right behavior and the documents are fake or what is going on?

spfx – Clear the control of the people selector when clicking on the button

I am using the People Picker control in my SPFx Web Part.

I want to clear the value of this control at the click of the button.

as mentioned in the comments here, I tried to define the value of defaultSelectedUsers to an empty board, but I still can't clear the people picker.

How can I get the above behavior?

sharepoint online – Can I combine the provider hosted app and the spfx app in one app?

I am creating a product that is available in both versions of SharePoint online, that is to say the modern and classic view. I developed the application hosted by the provider as well as the spfx application, now the problem is that the client has to install the two applications separately, so is it possible to have only one app for the two apps hosted by the provider as well as the spfx app. Is it possible? If yes, then how?