Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Main account selection for SO Posting

(0) ShareShare
ReportReport
Posted on by

Hi ,

I'm having a requirement to select the main account during SO posting based on custom field , currently as per inventory posting setup and the combination of item/category the items will be posted to the relevant main account that is configured, so now i need to introduce a new field in SO line level and the same field should be introduced in the below posting setup form, so whenever SO line is added user will select the value from new custom lookup field which we going to introduce and at the time of invoice posting we need to fetch main account based on current combination and along with new custom field matching, so could you provide assistance on how to implement this? details of posting classes where we want to customize?

pastedimage1676280024874v1.png

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,160 Super User 2025 Season 1 on at
    RE: Main account selection for SO Posting

    Hi Vignesh,

    As mentioned above, you can't extend/change the standard table indexes. Currently there is a unique index which will cause the duplicate record error. You should think of another solution direction, like a new table which is also suggested above.

  • RE: Main account selection for SO Posting

    Hi Andre,

    Could you provide some more assistance on this? As per current MS logic, we can't have different main account configuration for same item code/item relation as system will throw duplicate record error and we're trying to overcome this standard limitation by allowing the same item code combination which will be differentiated by new custom field value and main account selection, so could you guide further on the approach we can consider to achieve this?

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,160 Super User 2025 Season 1 on at
    RE: Main account selection for SO Posting

    Hi Vignesh,

    For sure you can extend the InventPosting table, but you can't use it as distinction for the ledger account as one of the indexes will not allow duplicates for the current existing fields.

    There is no real need to extend the InventPosting form. As alternative the new table can also be set up on a new form. The choice would be up to you.

  • RE: Main account selection for SO Posting

    Hi Andre,

    Can't we have new custom field in inventposting without included in existing index? and the main account field mentioned by mariano is specifically used for return orders it seems and we can't make use of that. Also as you mentioned do we need to have new table for custom field and to be used in logic? in that case the new table should also be added as datasource in inventposting form level as we need to show that field there as well.

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,160 Super User 2025 Season 1 on at
    RE: Main account selection for SO Posting

    Hi Vignesh,

    As mentioned by Mariano, before you post the invoice, you can fill the main account manually. If you need to have the ledger account as per custom logic, you would not be able to extend the InventPosting table with a new field as you can't extend the indexes. One of the indexes does not allow for duplicates.

    You would then need to create an additional table and check where you can hook in to change the ledger account. This could be or filling the fields as suggested by Mariano or during posting, but then you need to really search for the best way to extend the standard coding.

  • RE: SO Posting

    Anybody having idea on this? Any assistance will be appreciated.

  • RE: SO Posting

    Hi Everyone,

    Any other inputs on this?

  • BillurSamdancioglu Profile Picture
    BillurSamdancioglu 16,620 Most Valuable Professional on at
    RE: SO Posting

    As far as I remember, this field is only used for return orders.

  • RE: SO Posting

    Hi Mariano,

    As per current process, the field you highlighted is not getting any value even after sales order is invoiced, the transactions are posted to the main account based on posting profile setup, so could you explain how can we make use of this field?

  • RE: SO Posting

    Have you tried using the standard field "Main account" from the sales line?

    3250.Captura.JPG

    You can write your own extension to initializate this field value based on your logic.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,160 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,962 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans