May 13, 2017

Send Message to all Online users [Dynamics 365 FO]

Hi Guys,

In D365 where we manage most of the things using LCS, if there is any Planned/Unplanned activity need to perform on server and down time require.
In such case, you need to send a message to all online used for that particular environment. To do that simply follow below steps,

Step 1: Login into your LCS account. 

Step 2: Under Environment section > select your environment. > Click on maintain option > Select Message online users.

clip_image001[4]

Step 3: Here you will have two options
i.                    Broadcast a new message for downtime: Post a new message
ii.                 Cancel message: To cancel any previous posted message.

clip_image003[4]

Step 4: Select Broadcast a new message for downtime, you have to provide message start date time and when this operation will begin OR massage valid to date time. click on Post button and click when asking for confirmation.

clip_image004[4]

Step 5: When a user will login into environment he/she must get this message
clip_image005[4]

Step 6: Now if in case you have to postpone or cancel this activity, choose second option i.e. Cancel message, system will ask which message you want to cancel as there can be multiple messages.
clip_image006[4]

Let’s try to cancel first message that we created in last step. In the right corner, you will found a delete icon, click on that icon and hit yes when ask for confirmation. You will see now only two messages are active here

clip_image007[4]

Now when user will login in next time he/she will not any notification from system.

Enjoy…
-Harry.

May 06, 2017

Merger two LedgerDimension in Dynamics 365

Hi Folks,

In my previous post I shared  information about new classed that introduced in D365 for Dimension actions. In this post, I am sharing a sample code to merge two different ledger dimension and get a new LedgerDimension id.
This is rough code, please feel free to copy and update it according to your requirement.

public static void main(Args _args)
   {    
       LedgerJournalTrans  ledgerJournalTrans1, ledgerJournalTrans2 ;
       RefRecId            dim1, dim2, mergerDim;
      
  
       select firstonly TrvExpTrans where TrvExpTrans.ExpNumber == "USMF-000565";
       select firstonly AccountingDistribution where AccountingDistribution.SourceDocumentLine == SourceDocumentLine::find(TrvExpTrans.SourceDocumentLine).RecId;
       //AccountingDistribution::
       dim1 = TrvCostType::find("mycategory").LedgerDimension; //First dimension
       dim2 = 5637236123;//AccountingDistribution.LedgerDimension; //Second dimension
       mergerDim = LedgerDimensionFacade::serviceMergeLedgerDimensions(dim1, dim2);
     
      info(strFmt("Dim1: %1" , DimensionAttributeValueCombination::find(dim1).DisplayValue));
      info(strFmt("Dim2: %1" , DimensionAttributeValueCombination::find(dim2).DisplayValue));
      info(strFmt("merge dim: %1", DimensionAttributeValueCombination::find(mergerDim).DisplayValue));
  
   }

Please share your queries/feedback in comment box, I will be happy to help you.

-Harry