Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I've created doc type with property e.g. (Name = "ItemId" Type = "Label")
When i try to "Save and Publish" node with current doc type i set some value to this label. (note that i override SendAsync method)
It sets value correctly, but label still appears to be empty. So if i click on "Save and Publish" second time it sends an empty value still... I need somehow to refresh page because on second time i need "guidvalue" to update other items
Can you post some code to explain how you're setting the value?
Thanks for your response. Sure.
protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
var path = request.RequestUri.AbsolutePath.ToLower();
return await SaveEvent(request, cancellationToken);
return await base.SendAsync(request, cancellationToken);
private Task<HttpResponseMessage> SaveEvent(HttpRequestMessage request, CancellationToken cancellationToken)
return base.SendAsync(request, cancellationToken)
var response = task.Result;
HttpContent data = null;
ContentItemDisplay content = null;
data = response.Content;
content = ((ObjectContent)(data)).Value as ContentItemDisplay;
if (content.ContentTypeAlias.ToLower() == "DocTypeAlias")
var cs = ApplicationContext.Current.Services.ContentService;
var currentEvent = cs.GetById((int)content.Id);
It sets the value for LabelAlias in DB, but page still shows an empty value and on second press "Save and Publish" i got an empty value.
That's why i need to refresh the page to get "guidvalue" in label data type
Did you find a solution to this in the end?
Have you considered using an HTTP interceptor to update the values before they hit the server? You should be able to catch the request to /postSave, then modify the data model.
Not sure though if that will impact the displayed value in the data type
Yeah it seem like the only option I could do. I had to re render the datapicker to display the changes.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted