cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Fetch Auto Number Sequence From D365 F&O to PowerApps

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.

8 REPLIES 8
Highlighted
Community Support
Community Support

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

Highlighted

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.

Highlighted

Hi @Manikanta1231 ,

 

Are there any examples?

Sik

Highlighted

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 

Highlighted

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

Highlighted

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. 

Highlighted

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. ?

Highlighted

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? 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Users online (9,747)