Friday, 21 May 2021

Power App and SharePoint Connection Patch Update Query

 Create Data in SharePoint from Canvass APP 


Patch(
'SharePoint Data', //Data base 
Defaults('SharePoint Data'),
{
Title: TextInput1_1.Text,
'Last Name': TextInput2_1.Text,
Email: TextInput3_1.Text,
'Candidate ID': Value(TextInput4_1.Text),
'Reason for Late Submission': TextInput5_1.Text,
'Detailed Work Description': TextInput6_1.Text,
'Work Request Justification': TextInput7.Text
},


{//for Drop Down 
'Work Description': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: Dropdown1.SelectedText.ID,
Value: Dropdown1.SelectedText.Title
},
'Project Approver':{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: Dropdown2.Selected.ID,
Value: Dropdown2.Selected.Value
}
}

);


Update 

UpdateIf('SharePoint Data', 'Candidate ID'= Value(TextInput4_2.Text),{
Title:TextInput1_2.Text,
'Last Name':TextInput2_2.Text,
Email:TextInput3_2.Text,
'Candidate ID':Value(TextInput4_2.Text),
'Reason for Late Submission':TextInput5_2.Text,
'Detailed Work Description':TextInput6_2.Text,
'Work Request Justification':TextInput2_2.Text,
'Work Description': {
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:Dropdown1_1.SelectedText.ID,
Value:Dropdown1_1.SelectedText.Title}
});
Navigate(Screen2,ScreenTransition.Fade)


Thursday, 15 April 2021

Connect Dynamic CRM 365 using console with Mutli Factor Authentication

Get Client Id and Secret from APP registration in azure portal    

  string connectionString = "AuthType=ClientSecret; url=https://org55ced39c.crm.dynamics.com/;ClientId=ClientID ClientSecret=Secret";


            CrmServiceClient crmServiceClient = new CrmServiceClient(connectionString); //Connecting to the D-365 CE instance


            if (crmServiceClient != null && crmServiceClient.IsReady)


            {

                OrganizationServiceContext orgContext = new OrganizationServiceContext(crmServiceClient);


               var contact = from c in orgContext.CreateQuery("contact")

                             select c;


                Console.ForegroundColor = ConsoleColor.Green;


                Console.WriteLine("\nConnected Successfully!");