Skip to main content

Posts

ALM in Power Platform

ALM in Power Platform $SecurePassword = ConvertTo-SecureString 'pw123' -AsPlainText -Force $creds = New-Object System.Management.Automation.PSCredential ('name@email.com', $SecurePassword) $Connection = Get-CrmConnection -OnLineType OAuth -OrganizationName 'orgname' -DeploymentRegion 'Oceania' -Credential $creds $EnvVariableId is the GUID of the environment variable function Update-EnvVariable ( [Guid] $EnvVariableId, [Microsoft.Xrm.Tooling.Connector.CrmServiceClient] $Connection ) { $updateFields = @{ } $updateFields.Add("value", $Value) Set-CrmRecord -conn $Connection -Fields $updateFields -Id $EnvVariableId -EntityLogicalName "environmentvariablevalue" } Update-EnvVariable - $EnvVariableId -$Connection
Recent posts

How to Use Batch to call SharePoint Rest API in PnP-JS

Using Batch in PnP-JS import { sp } from "@pnp/sp/presets/all"; import { dateAdd } from "@pnp/common"; const batch = sp.web.createBatch(); var ListsArr = ["Admin_Test", "Test_attch","TestCopy"] ListsArr.forEach((list)=>{ sp.web.getList(`sites/MyTeamSite/Lists/${list}`).items.inBatch(batch).usingCaching({ expiration: dateAdd(new Date(), "minute", 2), key: `cache_${list}`, storeName: "local" }).get() .then(items1 => { console.log(items1); }); }) // this line executes actual HTTP request to $batch endpoint batch.execute() .then(data => { // at this point all requests will be completed console.log('done'); });

package.json

{ "name": "yammer-auth", "version": "1.0.0", "description": "", "main": "app.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "lite-server" }, "author": "Sai Prasad Padhy", "devDependencies": { "lite-server": "^2.5.4" } }

Http Client Post Request to get OAuth2 Token Using c#

Http Client Post Request to get Oauth2 Token Using c# string tenentID = "YOUR_TENENT_ID"; string clientID = "CLIENT_ID"; string clientSecret = "YOUR_CLIENT_SECRET"; HttpClient Rclient = new HttpClient(); var Rcontent = new StringContent("grant_type=client_credentials&client_id=clientID&client_secret=clientSecret", Encoding.UTF8, "application/x-www-form-urlencoded"); var result = await Rclient.PostAsync("https://login.microsoftonline.com/tenentID/oauth2/token", Rcontent); string resultContent = await result.Content.ReadAsStringAsync();

Dynamics 365 services

 Dynamics 365 Services Dynamics 365 Field Service app you can generate work orders with required products and services to be delivered. Also, it allows you to keep track of supplies (serviceable assets) and their inventory in locations like warehouses, field service vehicles, etc. You can schedule resources on work orders based on their availability and skillset and manage their mobile workforce. Dynamics 365 Customer Service  allows taking support requests from their clients via phone call, email, web, social media, and capture using a case form. You can also keep track of contracts for each client using entitlements. These entitlements can be based on the number of hours or number of cases. Entitlements, along with Service Level Agreements (SLAs), ensure timely service delivery and improves customer satisfaction level. Dynamics 365 Marketing you can define a customer journey that helps in developing and nurturing leads through a personalized experience. With the rich editor, you can

Get Oauth token in Power Automate

 Get Oauth token in Power Automate

Update SPO List Items in batch using PnP PowerShell

Updating SharePoint List Items using PnP-PowerShell $SiteURL="https://saiprasadp.sharepoint.com/sites/TestClassic" $ListName= "Test List" $SPQuery = "<View><Query><Where><Eq><FieldRef Name='Urgency'/><Value Type='text'>High2</Value></Eq></Where></Query></View>" #Connect to PNP Online Connect-PnPOnline -Url $SiteURL -UseWeblogin #sharepoint online pnp powershell get list items $ListItems = Get-PnPListItem -List $ListName -Query $SPQuery #Update items in batch $batch = New-PnPBatch foreach($ListItem in $ListItems) { Write-Host "ID:" $ListItem["ID"] Set-PnPListItem -List $ListName -Identity $ListItem["ID"] -Values @{"Title"="Updated Title1"} -UpdateType UpdateOverwriteVersion -Batch $batch } Invoke-PnPBatch -Batch $batch