How to – Generate Long-Lived Page Access Token – Facebook


Login to Meta for Developers and note down the App ID and App Secret of the app.

Access Tokens – https://developers.facebook.com/docs/pages/access-tokens/

https://developers.facebook.com/apps/

To get the long-lived page access token, first, we need to generate a short-lived Access Token.

In Graph API Explorer – https://developers.facebook.com/tools/explorer, select the App and the page (provide appropriate permissions) and click on Generate Access Token to generate the token.

Navigate to Access Token Debuggerhttps://developers.facebook.com/tools/debug/accesstoken/, paste the token and click on Debug.

We can see the token expiry in 1 hour.

To generate a Permanent or Long-lived token we can make use of the below application.

https://bnjis.github.io/Facebook-permanent-token-generator/

Specify App ID, App Secret, and User Access Token and click on Submit.

We will get the permanent token generated for us.

On pasting this token in the Access Token Debugger, we can see the expiry set to Never.

The other option is to use the Extend Access Token option when we generate a short lived token

EFBT

GT

Check the below link for more details –

https://developers.facebook.com/docs/marketing-apis/overview/authentication/

https://developers.facebook.com/docs/facebook-login/guides/access-tokens/get-long-lived/

https://medium.com/@blienart/get-a-permanent-facebook-page-access-token-a96470dc03ca

https://developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension

Hope it helps..

Advertisements

How to – Hide Approve / Reject Button in Approval Email in Power Automate Approval Workflow


Recently we had a requirement to remove or hide the Approve and Reject buttons from the approval email as we wanted the user to manage it all from the Approval Center.

The way we implemented this is by replacing the Start and wait for an approval action with Create an approval, Send email notification and Wait for an approval action.

For Create an approval action, set Enable notifications as No this makes sure no email is sent.

Followed by– in the body, specify Send an email notification the Approval Center link.

Followed by Wait for an approval, specify the Approval ID there.

And the Condition control and the required logic.

After running the flow, the user will get the email and can click the link to navigate to the Approval center.

The user can then take the required action from within the Approval center.

The flow will wait for the user

Also, check – Implementing approvals with Teams notifications

https://powergi.net/2021/07/11/use-power-automate-approvals-with-teams-notifications-only-no-emails/

Check other articles on Power Automate Approvals 

Approvals – Power Automate & Dynamics 365

Hope it helps..

Advertisements

Format property missing in Date Picker in custom page – Dataverse / PowerApps


Recently while designing the custom page, we realized that the format property is missing for the Date Picker control. This is because Date Picker control is based on Fluent UI Library.

One option earlier was to enable the Classic Controls from Settings

And replace the existing control with the classic control

Also, check – https://debajmecrm.com/get-todays-date-format-dates-in-power-apps-canvas-app/

https://powerusers.microsoft.com/t5/Building-Power-Apps/Date-picker-missing-format-property/td-p/903794

https://powerusers.microsoft.com/t5/Building-Power-Apps/Custom-Page-Date-Picket-Format-Date/td-p/1349351

Hope it helps..

Advertisements

Configuration Migration Tool Filter Updates and the Power Apps Portal


Example of applying filter to select only those Journey records that are in draft state and records having ‘copy’ work in its name.

Also checked – Do not update existing records.

On importing in the destination, as these 2 records were already there, it neither updated nor created any new records as expected.

cv's avatarColin Vermander

If you haven’t heard or seen the most recent update to the SDK tool Configuration Migration Tool (CMT) then it is a must check out as the latest version of the tool includes filtering capaibility as Alan Mervitz (@amervitz) noticed on Twitter and has documented on his blog.

This feature in CMT has been long sought after for years…and years. The basics of the ask were, filter the data prior to exporting, so that you could extract a subset of data. Previously CMT worked in a fashion for an entity that it was all the records or nothing. You can 100,000 contacts in your system, it would attempt to extract all of them. Now you can provide a Fetchxml filter to a data schema definition and have that applied when CMT requests the data from CDS (also known to some as Dynamics 365/CRM…still). You could previously post process exports…

View original post 525 more words

Marketing Form and required (mandatory) fields in Lead and Contact – Dynamics 365 Marketing


Let us take one of the out-of-the-box marketing forms available in Dynamics 365 Marketing.

It has only an Email field marked as required and creates / updates both contacts and leads.

If we click on Check for errors we will get the below notifications.

  • To create a Contact, the Last Name (lastname) field should be included in your form and marked as required.
  • To create a Lead, the Last Name (lastname) field should be included in your form and marked as required.

Now let us host this form and try submitting it.

Click on Go Live, and create a new related marketing form page for it. Make sure you have the domain already authenticated.

Authenticate Domainhttps://nishantrana.me/2022/11/09/how-to-authenticate-domain-in-dynamics-365-marketing/

Embed Marketing Form on the external pagehttps://nishantrana.me/2022/11/10/how-to-embed-marketing-form-on-an-external-page/

Open the Form page and copy the script to host the form.

On the host page, let us submit the details.

Back in our Marketing form, we can see the submission.

And also, both the lead and contact records created.

Now let us try one more submission without specifying a value for the lastname field (which it was showing in the notification, as a required field to be added on the form, for both the lead and contact table).

We can see the submissions in the Marketing Form.

And both the lead and contact records were created.

So although it shows the notification for all the mandatory fields which are not added in the form and marked as required, it still allows the record to be created.

Hope it helps..

Advertisements

Sample formula for Associating N:N records and Creating 1:N records in Canvas App (PowerApps / Dataverse)


Just sharing the sample formula, we used for associating selected products from the gallery to lead on OnSelect of a button.

Here collectionCheckedProducts contains the checked products from the gallery bound to the product data source –

varEnquiryIdWithoutCurlyBraces contains the GUID of the Lead record. Here Enquiry is Lead renamed.

Enquires(leadproduct_association) is the name of the relationship between lead and product.

Relate function is used to associate multiple selected products in collectionCheckedProducts to a lead record.

And below is the sample formula we used for creating Quote Product for selected products from the gallery.

varEnquiryIdWithoutCurlyBraces contains the GUID of the Quote record. Proposal Data Source is the Quote renamed.

Hope it helps..

 

Advertisements