AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 18.07.2018, 03:17   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
powerobjects: Displaying Dynamics 365 Data in your PowerApps Application
Источник: https://www.powerobjects.com/2018/07...ata-powerapps/
==============


Let’s say you use Microsoft Dynamics 365 in your organization extensively, and now you want to build some apps in PowerApps so your sales team can start interacting with your CRM data quickly and efficiently while on the road. If you were planning to use the Dynamics 365 connector to connect to your CRM, you would want to look at the formulas below to complete and deploy your app.

In this blog post, we will assume that you are building a PowerApps app based on the Opportunity entity in Dynamics 365. The use case is that you want a sales person to be able to view “today’s” appointments and view only their own opportunities (“My Opportunities”).

Setting Variables When App Starts

On the main form of the app, there will be an additional Event called OnStart that will not be present on other forms you add to your App. This Event will run the formulas when the App opens in the designer, but not afterwards. So if there are Formulas you wish to re-execute, such as Refresh(datasource), then you would want to add a refresh button on the form with the same formulas. It also will give the user the ability to refresh the data to its most current state. Below are some formulas that you will want to set in any app you build:

Set(CurrentUserEmail, Text(User().Email)); // set current user’s email in the CurrentUserEmail variable

Set(CurrentUserID, LookUp(Users, domainname=CurrentUserEmail,systemuserid)); // set current user in the CurrentUserID variable

Filtering Opportunities for Current User

Let’s say you want the logged in user to see only their own opportunities (My Opportunities) in the app. In your gallery control, you can set the Items property to a Filter function to filter the rows.

Filter(Opportunities,_ownerid_value=CurrentUserID)

Filtering Appointments for Current User With Actual Start Date of Today

The following formula can set your gallery to show the current user’s appointments for the day:

Filter(Appointments,_ownerid_value=CurrentUserID,scheduledstart>=Today(),scheduledstart0,true)),

“1-StageA”, Filter(Opportunities, statecode=0,_ownerid_value=CurrentUserID,stepname=”1-StageA”, If(Find(Lower(Trim(SearchOpportunities.Text)), Lower(LookUp(Customers,contactid=_customerid_value,fullname)))>0,true)),

“2-StageB”, Filter( Opportunities, statecode=0, _ownerid_value=CurrentUserID, stepname=”2-StageB”, If(Find(Lower(Trim(SearchOpportunities.Text)), Lower(LookUp(Customers,contactid=_customerid_value,fullname)))>0,true))

)

Conclusion

All the formulas mentioned above can get you a simple, lightweight, and effective PowerApps app that will let your sales team interact with ONLY Opportunities and Activities – which is a very common requirement for many projects! They will be able to look at just their own opportunities and activities without getting distracted by menu items, screens, tiles that they don’t need!

Try these formulas for your apps, and let us know how it goes!

Want to learn even more about Microsoft PowerApps? Join PowerObjects, this year’s Platinum Sponsor, at the Microsoft Business Applications Summit on July 22-24 in Seattle. Register with code HCL100dc to receive a $100 discount.

Be sure to subscribe to our blog for more Dynamics 365 related posts!

Happy Dynamics 365’ing!



Источник: https://www.powerobjects.com/2018/07...ata-powerapps/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
survivingcrm: Exploring CDS for Apps Platform Licensing (PowerApps) Blog bot Dynamics CRM: Blogs 0 10.05.2018 23:12
powerobjects: Capturing Signatures in Dynamics 365 Blog bot Dynamics CRM: Blogs 0 16.04.2018 23:15
powerobjects: Spring Update Webinar Series for Dynamics 365 Blog bot Dynamics CRM: Blogs 0 13.04.2018 21:14
powerobjects: Dynamics 365 Data Migration Testing Best Practices Blog bot Dynamics CRM: Blogs 0 02.03.2018 22:13
powerobjects: Configuring the Dynamics 365 App for Outlook Blog bot Dynamics CRM: Blogs 0 08.11.2017 01:12
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 11:54.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.