• Bugude
  • NEWBIE
  • 10 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 12
    Replies
Hi All,

We are exploring an integration where an status update from order processing application has to be consumed by multiple applications.

The integration pattern we identified to be suited best for us is Publish-Subscribe Channel (http://www.enterpriseintegrationpatterns.com/patterns/messaging/PublishSubscribeChannel.html).

In this scenario, the Order processing application will publish the order status to an intergration layer (middleware or messaging queues), where in the consumer application (Salesforce is one of them) will need to subscribe to the integration layer (a topic or a queue) to receive the status when published.

I have explored push topics but it seems to me that they might be used for publishing the data from Salesforce to external systems but not the other way around.

Is there any mechanism in Salesforce to subscribe to a queue or topic in integration layer to receive the updates in real time?

Any pointers are much appreciated.

Thanks!

Regards,
Lakshman
  • March 15, 2018
  • Like
  • 0
I am trying to have the similar functionality of "View Components" for the installed packages in Java.

In Tooling API, there is a Publisher object which provides details on installed packages but there is no straight forward way to find the components for each package.

Any pointers is much appreciated.
  • September 28, 2017
  • Like
  • 1
TrailHead - https://trailhead.salesforce.com/en/lightning_app_builder/lightning_app_builder_recordpage

I am trying to complete the challenge. I can create the Account Record lightning page, add highlights, twitter and tabs and save successfully.
When I go to account and click on account, the tabs component disappears.

When I go back to the lightning page in the lightning app builder, the tabs component is also disappeared from there as well.

I tried to add and save again and again, it does not work.

Any help or info on this is appreciated.
  • September 19, 2016
  • Like
  • 0
Hi,

Is there any way to track whether an Activation or Reset Password Email is sent to the Community User (Contacts)?
Reporting on this will also be a good option.

Thanks!

Regards,
Lakshman
  • April 01, 2016
  • Like
  • 0
Hi,

Do we have the complete list of Salesforce Out Of the Box Error Messages.

Thanks!

Regards,
Lakshman
I have enabled Chatter Answers to override the change password page. This is working fine, on click of the link from email it is landing on the change password page.

In the controller of change password page, there is a redirect to another page based on certain conditions, this page redirect is not occuring.

PageReference ref = Page.resetPasswordPage;
return ref;

It seems like the page is stuck on change password page.

Both change and reset pages are added to communities.

Any information on this would be very helpful.
  • April 01, 2015
  • Like
  • 0
Hi,
 
We are trying to automate certail processes for which we need to find the dependent components for a Class/Page/Trigger.
 
We understand that salesforce is providing dependent components using "Show Dependencies" button when respective components are viewed but is there a way to get these programatically?
 
Any details around this is much appreciated.
 
Thanks!
  • December 04, 2014
  • Like
  • 0
We understand that the callout timeout is maximum of 120000 milliseconds (120 sec) and the default timeout is of 10 sec.
We have set the timeout_x variable to 120000 but still the timeout is occuring at 60 sec and the error message is shown as below in the debug logs.

IO Exception: External server did not return any content

does this mean that the response has been returned but without any content or are we having timeout at salesforce end.

Please help!.
In the custom webservice response, the tags are sorted alphabetically by salesforce automatically. Is there any way to control order of the tags in the custom webservice response?

More Details:
This is for Inbound service from another system to Salesforce. For this, we have writted a custom webservice in which the response tags are as below.

HEADER
PAYLOD
MESSAGE

In the response XML generated from salesforce, the above tags are rearranged as below.

HEADER
MESSAGE
PAYLOAD

which is causing the problem in the source system to process the response.

Is there anyway in salesforce to control the order/sequence of the tags in the response XML generated by Salesforce in the custom webservice.

I am trying to create a user using Apex class for which I have written the following code.

<Previous Code>
User user = new User();

user.FirstName = String.valueOf(usr.FirstName);
user.LastName = String.valueOf(usr.LastName);
user.Username = String.valueOf(usr.UserName);
.
.
.
<set the values for all the required field>
Upsert user;
<Following Code>

When i am trying to save the class, I am facing the following error.

"DML not allowed on User".

Please suggest.
I am trying to have the similar functionality of "View Components" for the installed packages in Java.

In Tooling API, there is a Publisher object which provides details on installed packages but there is no straight forward way to find the components for each package.

Any pointers is much appreciated.
  • September 28, 2017
  • Like
  • 1
We understand that the callout timeout is maximum of 120000 milliseconds (120 sec) and the default timeout is of 10 sec.
We have set the timeout_x variable to 120000 but still the timeout is occuring at 60 sec and the error message is shown as below in the debug logs.

IO Exception: External server did not return any content

does this mean that the response has been returned but without any content or are we having timeout at salesforce end.

Please help!.
In the custom webservice response, the tags are sorted alphabetically by salesforce automatically. Is there any way to control order of the tags in the custom webservice response?

More Details:
This is for Inbound service from another system to Salesforce. For this, we have writted a custom webservice in which the response tags are as below.

HEADER
PAYLOD
MESSAGE

In the response XML generated from salesforce, the above tags are rearranged as below.

HEADER
MESSAGE
PAYLOAD

which is causing the problem in the source system to process the response.

Is there anyway in salesforce to control the order/sequence of the tags in the response XML generated by Salesforce in the custom webservice.
I'm really stuck on this one.

For the first part I have:
torch.manual_seed(123)

# TODO: Generate 2 clusters of 100 2d vectors, each one distributed normally, using
# only two calls of randn()
classApoints = torch.randn(100,2)
classBpoints = torch.randn(100,2)
#println(classApoints)

# TODO: Add the vector [1.0,3.0] to the first cluster and [3.0,1.0] to the second.
classApoints += torch.tensor([1.0,3.0])
classBpoints += torch.tensor([3.0,1.0])
#println(classApoints)

# TODO: Concatenate these two clusters along dimension 0 so that the points
# distributed around [1.0, 3.0] all come first
inputs = torch.cat([classApoints, classBpoints],0)
#println(inputs) - I suspect U might be missing something in here but I'm not certain

# TODO: Create a tensor of target values, 0 for points for the first cluster and
# 1 for the points in the second cluster. Make sure that these are LongTensors.
classA = classApoints.zero_().long()
classB = classBpoints.fill_(1).long()
targets = torch.cat([classA, classB])
#println(targets.type()) - pretty sure this is correct and I've confirmed they are LongTensors

For the 2nd part (where I'm having error) I've got:
# TODO: Set the random seed to 123 using manual_seed
torch.manual_seed(123)


# TODO: Initialize a Linear layer to output scores 
# for each class given the 2d examples
model = nn.Linear(2, 2)

# TODO: Define your loss function
loss_fn = nn.NLLLoss()

# TODO: Initialize an SGD optimizer with learning rate 0.1
optimizer = torch.optim.SGD(model.parameters(), lr=0.1)

# Train the model for 100 epochs 
n_epochs = 1
losses = []
for _ in range(n_epochs):
  optimizer.zero_grad() 
  preds = model(inputs)
  #println(preds)
  #println(targets)
  loss = loss_fn(preds, targets)
  losses.append(loss)
  loss.backward()
  optimizer.step()
print(f'Anwswer to Exercise 6: Loss after {n_epochs} epochs: {losses[-1]}')
      
iterations = np.arange(len(losses))
_ = plt.plot(iterations, losses, '', iterations, losses, '-')

The error I'm getting:
--------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-65-b59a439a8791> in <module>() 20 #println(preds) 21 #println(targets) ---> 22 loss = loss_fn(preds, targets) 23 losses.append(loss) 24 loss.backward() /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in __call__(self, *input, **kwargs) 489 result = self._slow_forward(*input, **kwargs) 490 else: --> 491 result = self.forward(*input, **kwargs) 492 for hook in self._forward_hooks.values(): 493 hook_result = hook(self, input, result) /usr/local/lib/python3.6/dist-packages/torch/nn/modules/loss.py in forward(self, input, target) 191 _assert_no_grad(target) 192 return F.nll_loss(input, target, self.weight, self.size_average, --> 193 self.ignore_index, self.reduce) 194 195 /usr/local/lib/python3.6/dist-packages/torch/nn/functional.py in nll_loss(input, target, weight, size_average, ignore_index, reduce) 1330 .format(input.size(0), target.size(0))) 1331 if dim == 2: -> 1332 return torch._C._nn.nll_loss(input, target, weight, size_average, ignore_index, reduce) 1333 elif dim == 4: 1334 return torch._C._nn.nll_loss2d(input, target, weight, size_average, ignore_index, reduce) RuntimeError: multi-target not supported at /pytorch/aten/src/THNN/generic/ClassNLLCriterion.c:22

Can anyone assist on this?
  • December 28, 2018
  • Like
  • 0
Hi All,

salesforce communities users calendar sync with google calendar sync.
TrailHead - https://trailhead.salesforce.com/en/lightning_app_builder/lightning_app_builder_recordpage

I am trying to complete the challenge. I can create the Account Record lightning page, add highlights, twitter and tabs and save successfully.
When I go to account and click on account, the tabs component disappears.

When I go back to the lightning page in the lightning app builder, the tabs component is also disappeared from there as well.

I tried to add and save again and again, it does not work.

Any help or info on this is appreciated.
  • September 19, 2016
  • Like
  • 0
For Stream API, there is the idea of using PushTopic to trigger external web services. Is there one for the inverse? Ex. When an order is created on an external service and publishes it, is there something we can leverage on Salesforce to subscribe to message and act on it (create a new order in Salesforce using the received data)? 

The reason for this is to decouple the external service for explicitly calling Salesforce REST API. Any advice would be greatly appreciated.

Thanks
Jonathan Ng
Hello.

I'm trying to figure out how I can find out the URL for a particular page hosted in a Salesforce Site, using the metadata API.

I know that the url should be something like "https://AAA-BBB.CCC.force.com/DDD/Page_Name, where AAA is the sandbox name, BBB is the site name, CCC is the Salesforce host and DDD is the site path.

I have obtained the CustomSite metadata for the Site.  According to the documentation, the getSubdomain() method should give me "AAA-BBB.CCC.force.com".  However, instead it just gives me "BBB".

Is the documentation wrong?  If so, how do I generate the full URL for the page?
  • December 04, 2014
  • Like
  • 0
i reuire that if IE version is 8 or less then it should display a pop up or a message
but its not working

<!DOCTYPE html>
<html>
<body>
<script>
function getInternetExplorerVersion() {
    var rv = -1; // Return value assumes failure.

    if (navigator.appName == 'Microsoft Internet Explorer') {
        var ua = navigator.userAgent;
        var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");

        if (re.exec(ua) != null) {
            rv = parseFloat( RegExp.$1 );
        }
    }

    return rv;
}

function checkVersion() {
    var msg = "You're not using Internet Explorer.";
    var ver = getInternetExplorerVersion();

    if ( ver > -1 ) {
        if ( ver >= 9.0 ) {
            msg = "You're using a recent copy of Internet Explorer."
        }
        else {
            msg = "You should upgrade your copy of Internet Explorer.";
        }
    }
    alert(msg);
}
</script>
</body>
</html> 


no pop is displayed with this or message
Hi All,

Bashing my head on a wall with ths one - should be straight forward, but can't see it.
{!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}

IF(ISBLANK({!Lead.Parent_Account__c})){
alert ("Opportunity Amount cannot be blank")
}
else{
window.open('/001/e?acc8={!Lead.Annual_Revenue_as_Number__c}&acc2={!Lead.Company}&00N20000001N2Sm={!Lead.Account_Territory__c}&acc7={!Lead.Industry}&acc10={!Lead.Phone}&acc12={!Lead.Website}&acc17street={!Lead.Street}&acc17city={!Lead.City}&acc17state={!Lead.State}&acc17zip={!Lead.PostalCode}&acc17country={!Lead.Country}&00N20000002MmaF={!Lead.NumberOfEmployees}&00N20000003SB9T={!Lead.Users_with_Admin_Rights__c}& 00N20000002t8Zx={!Lead.End_Point_Protection__c}&00N20000001z52W={!IF(INCLUDES(Lead.Operating_System__c,"Mac OS") , "Mac OS" , "")}&00N20000001z52W={!IF(INCLUDES(Lead.Operating_System__c,"Server 2003") , "Server 2003" , "")}&00N20000001z52W={!IF(INCLUDES(Lead.Operating_System__c,"Server 2008") , "Server 2008" , "")}&00N20000001z52W={!IF(INCLUDES(Lead.Operating_System__c,"Vista") , "Vista" , "")}&00N20000001z52W={!IF(INCLUDES(Lead.Operating_System__c,"Windows 2000") , "Windows 2000" , "")}&00N20000001z52W={!IF(INCLUDES(Lead.Operating_System__c,"Windows 7") , "Windows 7" , "")}&00N20000001z52W={!IF(INCLUDES(Lead.Operating_System__c,"Windows 8") , "Windows 8" , "")}&00N20000001z52W={!IF(INCLUDES(Lead.Operating_System__c,"Windows 8.1") , "Windows 8.1" , "")}&00N20000001z52W={!IF(INCLUDES(Lead.Operating_System__c,"XP") , "XP" , "")}&00N20000001z52Q={!Lead.Number_of_Desktops__c}&00N20000001z52V={!Lead.Number_of_Laptops__c}&00N20000003S1MU={!Lead.Macs__c}&00N20000002MauY={!Lead.Number_of_Servers__c}&00N20000009XcUR={!Lead.Id}&retURL=/{!Lead.Id}');
}
In short, I've got a detail page button on Lead that will create an Account thru the URL. Once I realised I needed valudation on it to prevent Accounts being created from Leads that were already associated to Accounts, I changed the button execute Javascript and added the IF statement above.
Problem is, I get this error:
missing ) after argument list
BUT.... if I reference a standard field in the statement (say, {!Lead.Phone}) I get
missing ; after argument list

I'm relatively new to the dev side of SF, and am stumped by this. Can anybody shed any light?

Appreciated as always.
Michael
We understand that the callout timeout is maximum of 120000 milliseconds (120 sec) and the default timeout is of 10 sec.
We have set the timeout_x variable to 120000 but still the timeout is occuring at 60 sec and the error message is shown as below in the debug logs.

IO Exception: External server did not return any content

does this mean that the response has been returned but without any content or are we having timeout at salesforce end.

Please help!.

I am trying to create a user using Apex class for which I have written the following code.

<Previous Code>
User user = new User();

user.FirstName = String.valueOf(usr.FirstName);
user.LastName = String.valueOf(usr.LastName);
user.Username = String.valueOf(usr.UserName);
.
.
.
<set the values for all the required field>
Upsert user;
<Following Code>

When i am trying to save the class, I am facing the following error.

"DML not allowed on User".

Please suggest.