Welcome at schweda.net | EN | DE
 
 
 
 
 
This post is machine-translated. The original post in german language can be found here.

You can use the following line code to release a product in another company:

EcoResProductReleaseSessionManager ecoResProductReleaseSessionManager;
   
ecoResProductReleaseSessionManager =
EcoResProductReleaseSessionManager::newReleaseSession();

ecoResProductReleaseSessionManager.addProduct(52565549190);
ecoResProductReleaseSessionManager.addLegalEntityForAllProducts(
CompanyInfo::findDataArea('USP2').RecId);

if( !ecoResProductReleaseSessionManager.execute())
{
    error("An error occured");
}

If you want to release several products at once, this is also possible. In the next example, several products are released in different companies:

EcoResProductReleaseSessionManager ecoResProductReleaseSessionManager;
    
ecoResProductReleaseSessionManager =
EcoResProductReleaseSessionManager::newReleaseSession();

ecoResProductReleaseSessionManager.addProduct(52565549189);
ecoResProductReleaseSessionManager.addLegalEntityForProduct(
    CompanyInfo::findDataArea('USP2').RecId,
    52565549189);
ecoResProductReleaseSessionManager.addLegalEntityForProduct(
    CompanyInfo::findDataArea('USRT').RecId,
    52565549189);

ecoResProductReleaseSessionManager.addProduct(52565549187);
ecoResProductReleaseSessionManager.addLegalEntityForProduct(
    CompanyInfo::findDataArea('USPI').RecId,
    52565549187);
ecoResProductReleaseSessionManager.addLegalEntityForProduct(
    CompanyInfo::findDataArea('USRT').RecId,
    52565549187);

if( !ecoResProductReleaseSessionManager.execute())
{
    error("An error occured");
}

It is important to note that in the event of an error during release, the process will not be aborted. Products which could not be released can be found in the form Open product releases where you can also view the infolog.

Open product releases 

These post applies to following versions:
Dynamics AX 2012

Add comment

 

 
Feeds
RSS RSS feed
RSS RSS feed (Comments)
RSS RSS feed (Category)
 
 
posts of the actual month
Juni 2017
MoDiMiDoFrSaSo
 1234
567891011
12131415161718
19202122232425
2627282930 
 
 
© 2006-2016 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.