Posts

X++ Set One Of Financial Dimension Value to Empty

  [ExtensionOf(TableStr(TrvCashAdvance))] final class TrvCashAdvance_Extension { public void modifiedField(fieldId _fieldId) { next modifiedField(_fieldId); switch (_fieldId) { case(fieldnum(TrvCashAdvance, Worker)): this.updateDefaultDimension(); break; } } private void updateDefaultDimension() { HcmPersonnelNumberId hcmPersonnelNumberId; DimensionAttributeValueSetStorage dimStorage = new DimensionAttributeValueSetStorage(); DimensionAttribute dimAttribute; DimensionAttributeValue dimAttributeValue; DimensionDefault defaultDimension; #define.Worker('Worker') hcmPersonnelNumberId = this.Worker; defaultDimension = this.DefaultDimension; ttsBegin; dimStorage = DimensionAttributeValueSetStorage::find(defaultDimension...

how to install or regenreate TenantEncryptionCert on cloud hosted dev server in d365 fo

 Run Restart-Service RdAgent and Restart-Service WindowsAzureGuestAgent from PowerShell run this command on powershell and the issue is resolved

Inventory vs non inventory unit lookup in d365 fo x++

Image
  public void lookupInventoryUnitId(FormStringControl _formStringControl)   {       //for inventory unit id do not show conversion tab as the inventory unit is "base" for other units       UnitOfMeasureLookup::lookup(           _formStringControl,           '',           false);   }   public void lookupNonInventoryUnitId(FormStringControl _formStringControl)   {       //for non inventory unit show conversion tab and use inventory unit as a base for conversion       UnitOfMeasureLookup::lookup(           _formStringControl,           '',           true,           UnitOfMeasure::unitOfMeasureIdBySymbol(this.productData().unitsOfMeasure().parmInventoryUnitSymbol()));   }

step 20 Update script for service model: AOSService on machine: CR-VM-Test-1

  Hi, Cause: This can be either happening because of timeout or files being temporarily blocked. A general approach to resolve this issue would be the following: 1. Restart the Environment and try deploying the package again. 2. If that doesn't work, restart the Services and try deploying the package again.  3. If that doesn't work and if you see the below-mentioned error in the Log file: The process cannot access the file 'K:\AosService\WebRoot\bin\Microsoft.Dynamics.ApplicationPlatform.XppServices.Instrumentation.dll' because it is being used by another process,  following the below mentioned Action Plan should resolve the issue. Action Plan: 1. Open a PowerShell prompt as Administrator 2. Navigate to <Services drive>\DeployablePackages\<Runbook ID>\AOSService\Scripts 3. Create a temporary directory for log files 4. Execute: .\AutoUpdateAOSService.ps1 -LogDir <Log directory from step 3>. (Will likely take 75-100 minutes to complete) 5. Once the manua...

Which code segment should you add to the form initialization method in D365 fo

 PBIReportHelper.initializeReportControl method is used to embed a Power BI report (.pbix resource) in a form group control Add analytics to workspaces by using Power BI Embedded - Finance & Operations | Dynamics 365 | Microsoft Learn

detour issue Fields is not showing in custom Process in d365 fo x++

Image
 https://devdojo.com/blascogasconiban/whs-mobile-detour-not-loading-fields

Cancel salesline through code in D365 FO X++

  static void cancelSalesLine(Args _args) { boolean updated; SalesLine salesLine; try { ttsBegin; salesLine = SalesLine::findInventTransId('012411', true); updated = SalesUpdateRemain::updateDeliveryRemainder(salesLine, 0, 0); if(updated) { info("Salesline canceled"); } ttsCommit; } catch { error("SalesLine could not be canceled"); } }