• Shivram Saini
  • NEWBIE
  • 30 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies

Hello to you all,
                      I am developing a custom button New Asset -which will be added in the Asset related list on my Habitat custom object- to access the New Asset standard page. But I am not able to retrieve the AccountId related to the Habitat object in the button's URL as a parameter, so that when I go to the New Asset page, it pre-fills the Asset.AccountId field. Could you please help me on how to pass the AccountId as a parameter so that I can get the Asset.AccountId field pre-filled from the Habitat.AccountId field?

I thank you.

Regards,
Vijay.

I am getting this error when try to run the lightning component in the where i installed the package.

"domain-namespace.container.lightning.com’s server IP address could not be found".

It is working in packaging org but it is not working in the org where installed the package.

I truly appreciate your help.
I am getting this error when try to run the lightning component in the where i installed the package.

"domain-namespace.container.lightning.com’s server IP address could not be found".

It is working in packaging org but it is not working in the org where installed the package.

I truly appreciate your help.
Hi, 

I have this custom button that I'm using to Activate an order when clicked. Now I want this button to be hidden or grayed out when order status = Activated.

{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")} 

this.disabled=true; 
var c = new sforce.SObject("Order"); 

c.id = "{!Order.Id}"; 
c.Status = 'Activated'; 
c.Sync__c = true; 
result = sforce.connection.update([c]); 

window.location.reload();

Can someone help me out?
I have a formula field on Account to calculate survey score. I want to calculate Average of all child account + Parent account survey scores and show that Avg. survey score on Parent account.

I have a trigger but it is showing only 1 child account survey score. Please help me to figure out the code.
Please find below code.
 
trigger childaccount on Account (after update) 
{
Set<String> SetParentId = new set<String>();
Decimal Num;
for (Account a : trigger.new)
{
    if(a.parentId != null)
    {
        SetParentId.add(a.parentId);
    }
}

if(SetParentId.size() > 0 )
{
    List<Account> lstParentAcc = [ Select NPS_Score__c, Group_NPS__c , (Select NPS_Score__c From ChildAccounts) From Account where id in :SetParentId ];    

    For (Account ac : lstParentAcc)
    {
        List<Account> lstChildAcc = ac.ChildAccounts;

        for( Account childAcc : lstChildAcc )
        {
            Num = childAcc.NPS_Score__c;
        }
        ac.Group_NPS__c = Num;
    }
    if(lstParentAcc.size() > 0 )
    {
        update lstParentAcc;
    }   
   }   
  }
How can I get avg. of all child account and parent account survey score.
 
I am writing a trigger for updating the product according to the product name that matchs the name in a custom setting
Below is the query which I wrote, But do not understand why it is not retriving any data.

[select Trademark__c,Trademark_Word__c  FROM Trademark2__c WHERE Name LIKE %p.Name%]

Here my Name =  3010 and  p.Name=  I3010 18X12 5E/5E 0500+-002/DI

But this is not working as 3010 is not matching the p.Name.

I know this is something simple ,  But I am not able to figure this out.

Any help is highly appreciated

Hello to you all,
                      I am developing a custom button New Asset -which will be added in the Asset related list on my Habitat custom object- to access the New Asset standard page. But I am not able to retrieve the AccountId related to the Habitat object in the button's URL as a parameter, so that when I go to the New Asset page, it pre-fills the Asset.AccountId field. Could you please help me on how to pass the AccountId as a parameter so that I can get the Asset.AccountId field pre-filled from the Habitat.AccountId field?

I thank you.

Regards,
Vijay.

Hello All, 

I am tring to write test class for trigger (after delete ). I am Getting "Methods defined as TestMethod do not support Web service callouts, test skipped" this error while runing test class 

Please help me out 

Thanks in advance