Posts

After Adding user in F&O not authorized to open url in Dev mahine

Image
 Hi Viwers, Sometimes after adding the user account in system administer>> user  in F&O. User uanble to authorize the F&O url even the user is enable to telemetry not created. In such case, we can directly update objectID to the user by sql. This objectid id unique for each user across all the machines.

Show un committed records in between transaction in Sql

 select * from SALESTABLE  WITH (NOLOCK) 

Get ledger dimension from Main account with combination default dimension in ledgers

 Hi Viewers If you want to get ledger dimension based on only main account. please check below code.         RecId mainAccountRecId =  MainAccount::findByMainAccountIdAndCOA(mainaccount, LedgerChartOfAccounts::current()).RecId;         RecId defaultDimension = MainAccountLegalEntity::findByMainAccountLegalEntity(mainAccountRecId, CompanyInfo::find().RecId).DefaultDimension;         ledgerjournalTrans.LedgerDimension = LedgerDimensionFacade::serviceCreateLedgerDimension(LedgerDefaultAccountHelper::getDefaultAccountFromMainAccountIdAndCOA(mainaccount, LedgerChartOfAccounts::current()), defaultDimension);         ledgerjournalTrans.DefaultDimension = defaultDimension;

Add a check digit on generating number sequence through code x++ in d365F&O

 Hi Viewers, We a check digit on generating  number sequence through code x++. Check digit is a digit added as last digit to avoid wrongly entered by user. This didgit is summation of all the digits in the generated number. X++ code as follows.  public static str addCheckDigit(str _numberSeqNum)  {      return strFmt("%1%2", _numberSeqNum, modulo10(_numberSeqNum));  }  

How to load number sequence automatically on sandbox/trier-2/production environment along with package deployment.

 Hi Viewers, We can load number sequence automatically on sandbox/trier-2/production  environment along with package deployment. without using runnable class or custom script. We can use delegate method in  NumberSequenceModuleSetup class to load custom number sequence as shown below.    [SubscribesTo(classStr(NumberSequenceModuleSetup), delegateStr(NumberSequenceModuleSetup, numberSequenceModuleSetupLoadData))]   public static void NumberSequenceModuleSetup_numberSequenceModuleSetupLoadData()   {       FinTagGroupingNumberSeq     finTagGroupingNumberSeq  = new FinTagGroupingNumberSeq();       finTagGroupingNumberSeq .load();   }

Get customer from dynamic accounts ledger dimensions.

Image
 Hi Viewers, To get customer record from custTable from ledger dimension we can use standard method as below.