Error while properties set up in "Send Email" step in CRM 2013 process - workflow

I am using Microsoft Dynamics CRM 2013 On-Premise. I am facing with the issue while I am trying to set up any dynamic value to body section of "Send Email" step in CRM 2013 process.
Here is steps to reproduce in screenshot form:
1)
2)
3)
and stack trace:
[2014-05-13 15:40:23.325] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 31 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 0ceffee7-ec5f-4823-a0ce-b2ccb55a910d | ExceptionConverter.ConvertMessageAndErrorCode ilOffset = 0x23B
>System.Xml.XmlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #3AE9E085: System.Xml.XmlException: '&' is an unexpected token. The expected token is '"' or '''. Line 1, position 110.
> at System.Xml.XmlTextReaderImpl.Throw(Exception e)
> at System.Xml.XmlTextReaderImpl.ParseAttributes()
> at System.Xml.XmlTextReaderImpl.ParseElement()
> at System.Xml.XmlTextReaderImpl.ParseElementContent()
> at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
> at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
> at System.Xml.XmlDocument.Load(XmlReader reader)
> at System.Xml.XmlDocument.LoadXml(String xml)
> at Microsoft.Crm.Application.Platform.WorkflowLibrary.PropertyExpressionBuilder.CreateDynamicExpression(WorkflowStep workflowStep, WorkflowAttributeType attributeType, String propertyValue, Boolean isEmailBody)
> at Microsoft.Crm.Application.Platform.WorkflowLibrary.PropertyExpressionBuilder.CreateExpression(WorkflowStep workflowStep, XmlNode propertyNode, String propertyValue, WorkflowAttributeType attributeType, Boolean isEmailBody)
> at Microsoft.Crm.Application.Platform.WorkflowLibrary.PropertyExpressionBuilder.CreateExpression(WorkflowStep workflowStep, String entityName, String xml)
> at Microsoft.Crm.Application.WebServices.WorkflowWebService.UpdateSendEmailStep(String activityId, String entityId, String emailXml, String descriptionXml)
Please, help me with this problem! Thank you in advance!

The issue was resolved by changing browser. All steps to reproduce were done in Chrome browser. I have tried it in Firefox and it works fine.

Related

Azure Media Services v3 - c# Odata Query fails with 400 Bad Request for properties.created gt date works for REST api

Azure Media Services v3 - c# Odata Query fails with 400 Bad Request for properties.created gt date works for REST api.
Working REST Version
GET https://management.azure.com/subscriptions/1234/resourceGroups/ResGroup/providers/Microsoft.Media/mediaServices/testurstream/assets?api-version=2018-07-01&$filter=properties/created gt 2018-06-01 and properties/created lt 2019-07-01
Broken .NET Version (Fiddler trace)
GET https://management.azure.com/subscriptions/1234/resourceGroups/ResGroup/providers/Microsoft.Media/mediaServices/testurstream/assets?$filter=properties/created%20gt%20'2018-11-11T10%3A48%3A37Z'&api-version=2018-07-01
Docs state greater than is supported for created.
https://learn.microsoft.com/en-us/azure/media-services/latest/assets-concept#filtering-ordering-paging
properties.created Supports: Eq, Gt, Lt Supports: Ascending and Descending
Code Sample:
var query = new ODataQuery<Asset>(item => item.Created > lastFetchTime);
var assets = _client.Assets.List(ResourceGroup, AccountName, query);
Exception:
Microsoft.Azure.Management.Media.Models.ApiErrorException
HResult=0x80131500
Message=Operation returned an invalid status code 'BadRequest'
Source=Microsoft.Azure.Management.Media
StackTrace:
at Microsoft.Azure.Management.Media.AssetsOperations.<ListWithHttpMessagesAsync>d__5.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Media.AssetsOperationsExtensions.<ListAsync>d__1.MoveNext()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.Media.AssetsOperationsExtensions.List(IAssetsOperations operations, String resourceGroupName, String accountName, ODataQuery`1 odataQuery)
Fiddler Result
# Result Protocol Host URL Body Caching Content-Type Process Comments Custom
13 400 HTTPS management.azure.com /subscriptions/1234/resourceGroups/ResGroup/providers/Microsoft.Media/mediaServices/testurstream/assets?$filter=properties/created%20gt%20'2018-11-11T00%3A00%3A00Z'&api-version=2018-07-01 217 private application/json; charset=utf-8 amstestv3:7148
Looks like .NET is quoting the string for the 8601 datetime, which is breaking the call.
I checked in Postman also and this works fine:
$filter=properties/created gt 2018-01-11T01:00:00Z
But this quoted string throws a similar error message:
$filter=properties/created gt '2018-01-11T01:00:00Z'
Let me check on this with our .NET SDK team.
Working version - format string directly.
if (lastFetchTime != null)
{
var dateTime = lastFetchTime.GetValueOrDefault().ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffZ");
var odataQuery = $"properties/created lt {dateTime}";
query = new ODataQuery<Asset>(odataQuery);
}
var data = _client.Assets.List(ResourceGroup, AccountName, query);

Enterprise Architect - Import relations

I have a model in Enterprise Architect and I need to import some relationships (of already existing elements) that I have in an Excel. I tried running a JScript but wasn't able to run it (haven't still figured out why).
How can I import a massive amount of relationship into my model?
Thanks in advance.
My Script is:
!INC Local Scripts.EAConstants-JScript
var connectorArray = new Array(
['{870632BA-154F-4564-AD51-C508C1A7E537}','{4B291196-7B4B-490b-B51D-04B9925CAA2A}','Dependency','','RME1']
);
function main()
{
var source as EA.Element;
var target as EA.Element;
var connector as EA.Connector;
var sourceGUID,targetGUID,type,stereotype,alias;
for(var i = 0; i < connectorArray.length; i++) {
sourceGUID = connectorArray[i][0];
targetGUID = connectorArray[i][1];
type = connectorArray[i][2];
stereotype = connectorArray[i][3];
alias = connectorArray[i][4];
source = Repository.GetElementByGuid(sourceGUID);
target = Repository.GetElementByGuid(targetGUID);
Session.Output("Processing connector: " + alias);
if(source != null && target != null) {
connector = source.Connectors.AddNew("",type);
if(stereotype != "") {
connector.Stereotype = stereotype;
}
connector.SupplierID = target.ElementID;
connector.Alias = alias;
connector.Update();
}
source.Connectors.Refresh();
}
Session.Output("END OF SCRIPT");
}
main();
My errors are:
[423447640] Hilo de registro de pila establecido para marcos 3
[423447879] Default Directory is C:\Program Files (x86)\Sparx Systems\EA
[423447879] Agent dll found: C:\Program Files (x86)\Sparx Systems\EA\vea\x86\SSScriptAgent32.DLL
[423447879] Default Directory is C:\Program Files (x86)\Sparx Systems\EA
[423447879] Agent: Started
[423447967] Microsoft Process Debug Manager creation Failed: 0x80040154
[423447967] This is included as part of various Microsoft products.
[423447967] Download the Microsoft Script Debugger to install it.
[423447967] Failed to initialize JScript engine
[423447967] SesiĆ³n de depuraciĆ³n terminada
Thanks again.
Well, may be I'm wrong, but you can see the error Download the Microsoft Script Debugger to install it. I guess, that you're trying to run the script "Debug" button instead of "Run script".
If you want to debug your scrtipt, you"ll must to install any Microsoft product that contains debagger. Microsoft Script Debugger.
FYI Did you try the Excel Import \ Export feature of Sparx Systems in MDG Office Integration .
You can create \ update \ Synchronise model elements, connectors and other details inside enterprise architect in a single click.

Using a string as a RID with SQL Commands

Using the Java api on an Orient-DB 2.0 rc1. Is it possible to use a string as a RID?
Documentation : https://github.com/orientechnologies/orientdb/wiki/SQL-Update#example-3-add-a-value-into-a-collection
more specifiaclly the section SQL Commands
JSON received:
{
userRID:"#100:100",
group:"someCode"
}
JAVA CODE (xtend script):
def addUserInGroup(Message<JsonObject> message){
val params = new JsonObject() => [
putString("userId", message.body().getString("userRID"));
putString("code", message.body().getString("group"));
]
var queryCommand= "update Table add users=:userId where code=:code";
Map<String, Object> paramsFormatted = params.toMap();
database.command( new OCommandSQL(queryCommand) ).execute(paramsFormatted);
}
Table structure :
users : linklist (user object)
code : string
When I run the following commands in the studio they all work :
update Table add users=(Select #rid from User where #rid=#100:100) where code='someCode'
update Table add users=#100:100 where code='someCode'
But none of these command work in the API. I'm guessing there is something wrong in way I'm using the RID.
SEVERE: Exception in Java verticle
com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #29: Found unexpected keyword '=:USERID' while it was expected '[=]'. Use UPDATE <class>|cluster:<cluster>> [SET|ADD|PUT|REMOVE|INCREMENT|CONTENT {<JSON>}|MERGE {<JSON>}] [[,] <field-name> = <expression>|<sub-command>]* [LOCK <NONE|RECORD>] [UPSERT] [RETURN <COUNT|BEFORE|AFTER>] [WHERE <conditions>]
Command: update SecureAccess add users=:userId where code=:code
-------------------------------------^
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLAbstract.throwSyntaxErrorException(OCommandExecutorSQLAbstract.java:89)
at com.orientechnologies.common.parser.OBaseParser.parserRequiredKeyword(OBaseParser.java:317)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLUpdate.parseAddFields(OCommandExecutorSQLUpdate.java:605)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLUpdate.parse(OCommandExecutorSQLUpdate.java:129)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLUpdate.parse(OCommandExecutorSQLUpdate.java:59)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:56)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:37)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1150)
at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:63)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1179)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:385)
at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:216)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:65)
janv. 07, 2015 8:45:17 AM org.vertx.java.core.logging.impl.JULLogDelegate error
SEVERE: Exception in Java verticle
com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #29: Found unexpected keyword '=:USERID' while it was expected '[=]'. Use UPDATE <class>|cluster:<cluster>> [SET|ADD|PUT|REMOVE|INCREMENT|CONTENT {<JSON>}|MERGE {<JSON>}] [[,] <field-name> = <expression>|<sub-command>]* [LOCK <NONE|RECORD>] [UPSERT] [RETURN <COUNT|BEFORE|AFTER>] [WHERE <conditions>]
Command: update SecureAccess add users=:userId where code=:code
-------------------------------------^
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLAbstract.throwSyntaxErrorException(OCommandExecutorSQLAbstract.java:89)
at com.orientechnologies.common.parser.OBaseParser.parserRequiredKeyword(OBaseParser.java:317)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLUpdate.parseAddFields(OCommandExecutorSQLUpdate.java:605)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLUpdate.parse(OCommandExecutorSQLUpdate.java:129)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLUpdate.parse(OCommandExecutorSQLUpdate.java:59)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:56)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:37)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:1150)
at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:63)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1179)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:385)
at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:216)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:65)
I think You should try something like :
putString("userId", new ORecordId(message.body().getString("userRID")));

Alfresco 4.2.c rest api: create site giving error

I am trying to create a site using alfresco 4.2.c rest api /alfresco/wcservice/api/sites (PUT)
I am using admin user so no issues with permissions.
I am able to create site successfully using the alfresco share UI
String objectToPost = "{\"shortName\":\"firm007\", \"title\":\"firm007\", \"description\":\"firm007\", \"visibility\":\"PRIVATE\", \"isPublic\":\"false\", \"sitePreset\":\"site-dashboard\"}";
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
HttpEntity<String> entity = new HttpEntity<String>(objectToPost,headers);
String url = PRE_URL + "/alfresco/wcservice/api/sites"+"?alf_ticket="+ TICKET;
String response = restTemplate.exchange(url,HttpMethod.POST, entity, String.class, new Object[] {}).toString();
System.out.println("Created SITE response is =" + response);
I am getting 500 Internal Server Error on client side code
and on alfresco server, I am getting following stack traces.
please can you help solve this issue.
I want to create an alfresco site, through a remote REST api call
2014-06-17 08:39:38,232 ERROR [freemarker.runtime] [http-apr-8080-exec-4] Template processing error: "Expression site.shortName is undefined on line 9, column 56 in org/alfresco/repository/site/site.lib.ftl."
Expression site.shortName is undefined on line 9, column 56 in org/alfresco/repository/site/site.lib.ftl.
The problematic instruction:
==> ${url.serviceContext + "/api/sites/" + site.shortName} escaped ${jsonUtils.encodeJSONString(url.serviceContext + "/api/sites/" + site.shortName)} [on line 9, column 17 in org/alfresco/repository/site/site.lib.ftl]
in user-directive siteJSONManagers [on line 2, column 1 in org/alfresco/repository/site/site.lib.ftl]
in user-directive siteLib.siteJSON [on line 2, column 1 in org/alfresco/repository/site/sites.post.json.ftl]
Java backtrace for programmers:
freemarker.core.InvalidReferenceException: Expression site.shortName is undefined on line 9, column 56 in org/alfresco/repository/site/site.lib.ftl.
Caused by: freemarker.core.InvalidReferenceException: Expression site.shortName is undefined on line 9, column 56 in org/alfresco/repository/site/site.lib.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
at freemarker.core.Expression.getStringValue(Expression.java:118)
at freemarker.core.AddConcatExpression._getAsTemplateModel(AddConcatExpression.java:98)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.ListLiteral.getModelList(ListLiteral.java:119)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:91)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.getStringValue(Expression.java:93)
solved this little puzzler.
I had not added the content-type as "application/json" hence the request was barking up the wrong tree and going to ftl instead of json
following code works fine creating a site in alfresco.
headers.set("Content-Type", "application/json");
String objectToPost = "{\"shortName\":\"firm008\", \"title\":\"firm008\", \"description\":\"firm008\", \"visibility\":\"PRIVATE\", \"isPublic\":\"false\", \"sitePreset\":\"site-dashboard\"}";
System.out.println(objectToPost);
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
**headers.set("Content-Type", "application/json");**
HttpEntity<String> entity = new HttpEntity<String>(objectToPost,headers);
String url = PRE_URL + "/alfresco/wcservice/api/sites"+"?alf_ticket="+ TICKET;
String response = restTemplate.exchange(url,HttpMethod.POST, entity, String.class, new Object[] {}).toString();
System.out.println("Created SITE response is =" + response);

Intuit Reporting services (Balancesheet / profilt and loss)

i am using the following code to get the balancesheet and profilt and loss data from quickbooks.
OAuthRequestValidator oauth = new OAuthRequestValidator(accessToken, accessTokenSecret,
consumerKey, consumerSecret);
ServiceContext serviceContext = new ServiceContext(realmId, IntuitServicesType.QBO, oauth);
serviceContext.IppConfiguration.Message.Request.SerializationFormat =
Intuit.Ipp.Core.Configuration.SerializationFormat.Json;
ReportService reportService = new ReportService(serviceContext);
reportService.accounting_method = "Accrual";
reportService.start_date = "2014-01-01";
reportService.end_date = "2014-06-01";
Report report = reportService.ExecuteReport("BalanceSheet");
it compiles well, but when it runs it gives the following error.
"
**Ids service endpoint was not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Intuit.Ipp.Exception.EndpointNotFoundException: Ids service endpoint was not found.
Source Error:
Line 133: reportService.start_date = "2014-01-01";
Line 134: reportService.end_date = "2014-06-01";
Line 135: Report report = reportService.ExecuteReport("BalanceSheet");
Line 136:
Line 137:"**
Please use the correct date format YYYY-MM-DD.
Please use response format as JSON as xml is not supported. Your code will work then.
serviceContext.IppConfiguration.Message.Response.SerializationFormat = Intuit.Ipp.Core.Configuration.SerializationFormat.Json;