Hi,
try
{
ttsbegin;
Workflow::activateFromWorkflowType( workFlowTypeStr( "workFlowTypeName"), TableName.RecId, "Auto submitted by action Alfa", NoYes::No);
ttscommit;
}
catch(exception::Error)
{
throw Error("Not submitted");
}
The purpose of this blog is for knowledge sharing and connect the relevant audience who are all into Microsoft Dynamics world.
Hi,
Hi,
Usually, based on the FormControlEventArgs e, the cancellation can be implemented using the following code snippets:
FormControlCancelableSuperEventArgs eventArgs = e as FormControlCancelableSuperEventArgs;
eventArgs.CancelSuperCall();
In cases where there are no FormControlEventArgs, you are required to throw an error to halt the super process.
Thanks,
Hi,
DateTimeUtil::getToday(DateTimeUtil::getUserPreferredTimeZone())
Regards,
Hi,
can use the below code snippets in Controller or any other class called from
#Task
FormRun formRun;
formRun = element.args().caller(); // args.caller();
if(formRun)
formRun.task(#taskF5);
Regards,
hi,
public ExchRate exchRate(
CurrencyCode _fromCurrency,
CurrencyCode _toCurrency = Ledger::find(Ledger::current()).AccountingCurrency,
TransDate _transDate = today(),
)
{
ExchangeRate exchangeRate;
ExchangeRateType ExchangeRateType;
ExchangeRateCurrencyPair exchangeRateCurrencyPair;
real exchRate;
CurrencyCode fromCurrency = this.CurrencyCode;
TransDate transDate = this.TransDate;
select firstonly exchangeRateCurrencyPair where
exchangeRateCurrencyPair.ExchangeRateType == Ledger::find(Ledger::current()).DefaultExchangeRateType
&& exchangeRateCurrencyPair.FromCurrencyCode == _fromCurrency
&& exchangeRateCurrencyPair.ToCurrencyCode == _toCurrency;
return exchangeRate::findByDate(exchangeRateCurrencyPair.RecId,_transDate).ExchangeRate;
}
Hi,
SysReferenceTableLookup sysRefTableLookup;
Query lookupQuery = new Query();
QueryBuildDataSource lookupQueryDataSource;
QueryBuildDataSource PSASchedRoleQueryDataSource;
sysRefTableLookup = SysReferenceTableLookup::newParameters(tableNum(ResourceCategoryView), _formReferenceGroupControl);
sysRefTableLookup.addLookupfield(fieldNum(ResourceCategoryView, CategoryId));
sysRefTableLookup.addLookupfield(fieldNum(ResourceCategoryView, Name));
lookupQueryDataSource = lookupQuery.addDataSource(tableNum(ResourceCategoryView));
PSASchedRoleQueryDataSource = lookupQueryDataSource.addDataSource(tableNum(PSASchedRole));
PSASchedRoleQueryDataSource.relations(false);
PSASchedRoleQueryDataSource.joinMode(JoinMode::ExistsJoin);
PSASchedRoleQueryDataSource.addLink(fieldNum(ResourceCategoryView, RecId), fieldNum(PSASchedRole, RecId));
Regards,
Hi, update companyimage set companyimage.Image = companyimageA.Image from ( select Image from companyimage where dataAreaid = 'USF...