web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Fetch Auto Number Sequ...
Power Apps
Unanswered

Fetch Auto Number Sequence From D365 F&O to PowerApps

(1) ShareShare
ReportReport
Posted on by 8

Hi Everyone,

I have created a Purchase order Application that is connected to my D365 Finance and Operations instance. 

I want to fetch my automatic number sequence from D365 onto my powerapp while creating Purchase Order Header however, i have no idea how to do it.

 

Thanks in Advance.

I have the same question (0)
  • Leo Monteiro Profile Picture
    2 on at

    Hi all, I was facing the same issue.

     

    Unfortunately @AMoon  for F&O the Patch approach won't solve in this situation, it works only for Dataverse/CRM side.

     

    Instead, for F&O use Power Automate flows to create/update/delete the F&O records passing the needed parameters. Also is possible to receive the return data from the flow, it's very important to enable the creation of child transactions based on the header ids.

     

    More details: https://docs.microsoft.com/pt-br/powerapps/maker/canvas-apps/using-logic-flows

     

    My Power Automate flow:

    leonevesm_0-1637280047512.png

     

    Calling the flow in my app passing some parameters:

    leonevesm_1-1637280186988.png

     

    Hope it could helps. 

  • AaronMoon Profile Picture
    43 on at

    Sorry if wasn't clear, below are the steps I was envisioning

    1. Use Power App to create Purchase Order Header in F&O (When the PO is created F&O will generate the PO #)

    2. Use Power App to refresh and retrieve the new Purchase Order Header including the generated PO #

    3. Use Power App to edit the Purchase Order Lines, etc.

     

    Is there something preventing you from following the above process? 

  • Manikanta1231 Profile Picture
    8 on at

    Hi @AMoon ,

     Thank you for respond ,as you said we can do first step in F & O but our intention is to create Purchase order in PowerApps with number sequence. Is there any possibility that we can achieve. ?

  • AaronMoon Profile Picture
    43 on at

    Hi @Manikanta1231, I'm not sure about exactly how your process needs to occur, but could you create the purchase order in F&O as a first step in order to have F&O generate the number and any other defaults? Then you could refresh and pull that new Purchase Order back into your Power App with the PO # from F&O. 

  • v-siky-msft Profile Picture
    on at

    Hi @Manikanta1231 ,

     

    If you configure the order number field to Autonumber type, it will be auto-generated with the Prefix when the record is created.

    I think this can achieved your need. Does it make sense for your case?

    Sik

  • Manikanta1231 Profile Picture
    8 on at

    Hi @v-siky-msft ,

    For example, In D365FO if new create new purchase order it generates new purchase order number like "PO-000001",  for next purchase order it generates "PO-000002". Same as we need to fetch from D365FO in powerApps 

  • v-siky-msft Profile Picture
    on at

    Hi @Manikanta1231 ,

     

    Are there any examples?

    Sik

  • Manikanta1231 Profile Picture
    8 on at

    Thank you for respond. My requirement is like in D365FO whenever we create purchase order it follows number sequence same as it I need to implement in PowerApps.

  • v-siky-msft Profile Picture
    on at

    Hi @Manikanta1231 ,

     

    Could you please share more detail about your need? Do you mean want show the Autonumber in the form when creating a new record?

    The Autonumber field is generated when the record has been created, so when form turns to be in New mode, the Autonumber won't show.

    The workaround is to create a blank record by patch function, and then use Form to edit that record you just created, then the Autonumber will show.

    Set the OnSelect of button: 

    Set(VarA,Patch('Entity Name',Defaults('Entity Name'),{'The Required Fields':""}).'Unique Identifier field');EditForm(FormName) // create a new record with the required fields and save the GUID to VarA

    Set the Items property of Form:

    LookUp('Entity Name','Unique Identifier Field'=VarA)

     Sample:

    Snipaste_2020-07-02_16-05-54.png

    Hope this helps.

    Sik

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 428

#2
WarrenBelz Profile Picture

WarrenBelz 374 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 333 Super User 2025 Season 2

Last 30 days Overall leaderboard