Posts

Showing posts from August, 2024

How to get the logged in user using C# and UserId

  using Microsoft.Xrm.Tooling.Connector; using Microsoft.Xrm.Sdk; using Microsoft.Crm.Sdk.Messages; using Microsoft.Xrm.Sdk.Query; Add the code. We will first get the user id, then perform a retrieve to get the user’s name: try {     var connectionString =  @"AuthType = Office365;       Url =  https://yourtenant.crm.dynamics.com/;      Username=yourusername;      Password=yourpassword " ;     CrmServiceClient conn =  new  CrmServiceClient(connectionString);     IOrganizationService service =  (IOrganizationService)conn.OrganizationWebProxyClient !=  null  ?                             (IOrganizationService)conn.OrganizationWebProxyClient ;    (IOrganizationService)conn.OrganizationServiceProxy;       // Get...

Canvas app Task - Upload Files in share point using canvas app with power automate?

Image
 Upload Files in share point using canvas app with power automate? A) Step 1: Go to Power Automate ( https://make.powerapps.com ) and then Create an Instant Cloud Flow with Power apps v2 as a trigger. Step 2 : In Power apps V2 Provide Input (Text Input) and File Content . Step 3 : Now Take Variable and provide the type as string, Name as First Name and Value as Input . Step 4 : For Output Take the compose and provide Inputs as File Context. Step 5 : Create a Share Point and in documents create a folder Image doc. Step 6 : Now in power automate Create a file in share point connector. Step 7 : In Create a file for Site Address provide the link of Uploaded Images, In folder Path provide the path of the folder that you have created, File name as First Name and File Content as Outputs. Step 8 : Now Send Email for that Select Send Email V2 from Outlook   Step 9 : Go and create a blank canvas app then inside a canvas app insert a camera from media that will access your camera fr...

Variables in Power apps

Types of variables Power Apps has three types of variables: Variables type Scope Description Functions that establish Global variables App Simplest to use. Holds a number, text string, Boolean, record, table, etc. that can be referenced from anywhere in the app. Set Context variables Screen Great for passing values to a screen, much like parameters to a procedure in other languages. Can be referenced from only one screen. UpdateContext Navigate Collections App Holds a table that can be referenced from anywhere in the app. Allows the contents of the table to be modified rather than being set as a whole. Can be saved to the local device for later use. Collect ClearCollect

Power apps required powerfx Formula

Image
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-table-shaping Add Columns: The   Add Columns   function adds a column to a table, and a formula defines the values in that column. Existing columns remain unmodified. The formula is evaluated for each record of the table. Syntax:  AddColumns( Table Name, Column, Formula ) Add a second  Button  control, set its  OnSelect  property to this formula, and then run it: Example: ClearCollect( FirstExample, AddColumns (IceCreamSales, Revenue , UnitPrice*QuantitySold) ) And,   Or,   Not: The  And  function returns  true  if all of its arguments are  true . The  Or  function returns  true  if any of its arguments are  true . The  Not  function returns  true  if its argument is  false ; it returns  false  if its argument is  true . These functions work the same way as they do in Excel. Yo...