• Shweta Soparkar
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 9
    Replies
I have a URL like this:

https://c.na30.visual.force.com/apex/Revise_Quote?scontrolCaching=1&id=a0436000002Pnu0&quoteid=a07360000066Enb

Now this URL has the quote ID. I now want to select the radio button for this Quote ID which is displayed through my custom visualforce page.

User-added image

Any help is appreciated!!
I am planning to use APEX SOAP callouts. I have the standard WSDL but I am not able to create APEX classes for those. Any help is appreciated
trigger updateProduct on Product2 (after insert, after update) {

if(checkRecursive.runOnce())
{

List <Product2> li= new List<Product2>();
Set <Id> nameId = new Set<Id>();
List <Trademark__c>  trademarkList  = new List<Trademark__c>();

String myTradeMark = 'NotFound';
String myTradeMarkWord = 'NotFound';

    for(Product2 p : Trigger.new)
    {
        //if Name is not null
            nameId.add(p.Id);
            trademarkList   = [select Name, Trademark__c,Trademark_Word__c  FROM Trademark__c];
            
            if(!trademarkList.isEmpty())
            {
                for(Trademark__c t:trademarkList)
                {
                    if((p.Name).contains(t.name)) 
                    {
                    myTradeMark= t.Trademark__c;
                    myTradeMarkWord = t.Trademark_Word__c;
                    }
                }
               
            }
        //if Name is null put "Not Found" for TradeMark and TradeMark word
        else
        {
             myTradeMark= 'NotFound';
             myTradeMarkWord = 'NotFound';  
        }
    }
        li = [select Trade_Mark__c ,Trade_Mark_Word__c FROM Product2 where Id In :nameId];
    
        for(Product2 p :li)
        {
            p.Trade_Mark__c=myTradeMark;
            p.Trade_Mark_Word__c=myTradeMarkWord;
        }
        update li;
     
   } 
}
I am getting the below errors while deploying the trigger to porduction:-


"System.AssertException: Assertion Failed: Expected: 5, Actual: 6  Stack Trace: Class.SObjectUnitOfWorkTest.testUnitOfWorkNewDirtyDelete: line 139, column 1" 

System.AssertException: Assertion Failed: Expected: 5, Actual: 6 
Stack Trace: Class.SObjectUnitOfWorkTest.testUnitOfWorkOverhead: line 237, column 1
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
I have a master detail relationship wherein I have a master custom object named Contact and a detail relationship object Associated Account.
Now , in associated Account there is a field named primary account. One contact can be associated with many accounts but a contact can have only one primary account. So, here I want to write a trigger where whenever a user tries to create a record in associated account the trigger should fire and set all the primary account except the latest one to false(primary account is a checkbox). and the same should be reflected in contact.
Hi All ,
I have a requirement On validation rule /Apex Code :
I need to select at lease one check box to be selected in the multiple row, if not we have to through as error message as must be select on check box.
Are let us know any possible apreouches.Your quick responce would be greatly apreacites...!!!

Thanks,
M. Jagadeesh
I am not able to get through this challenge. 
I logged in through SOAPUI and used the session id to create an account. The account gets created and returns success. However when I try to validate the challenge in trailhead, it gives me an error - 

Challenge Not yet complete... here's what's wrong: 
It doesn't appear that you have logged in using SoapUI.

I am not sure what did I miss out.
I am planning to use APEX SOAP callouts. I have the standard WSDL but I am not able to create APEX classes for those. Any help is appreciated
trigger updateProduct on Product2 (after insert, after update) {

if(checkRecursive.runOnce())
{

List <Product2> li= new List<Product2>();
Set <Id> nameId = new Set<Id>();
List <Trademark__c>  trademarkList  = new List<Trademark__c>();

String myTradeMark = 'NotFound';
String myTradeMarkWord = 'NotFound';

    for(Product2 p : Trigger.new)
    {
        //if Name is not null
            nameId.add(p.Id);
            trademarkList   = [select Name, Trademark__c,Trademark_Word__c  FROM Trademark__c];
            
            if(!trademarkList.isEmpty())
            {
                for(Trademark__c t:trademarkList)
                {
                    if((p.Name).contains(t.name)) 
                    {
                    myTradeMark= t.Trademark__c;
                    myTradeMarkWord = t.Trademark_Word__c;
                    }
                }
               
            }
        //if Name is null put "Not Found" for TradeMark and TradeMark word
        else
        {
             myTradeMark= 'NotFound';
             myTradeMarkWord = 'NotFound';  
        }
    }
        li = [select Trade_Mark__c ,Trade_Mark_Word__c FROM Product2 where Id In :nameId];
    
        for(Product2 p :li)
        {
            p.Trade_Mark__c=myTradeMark;
            p.Trade_Mark_Word__c=myTradeMarkWord;
        }
        update li;
     
   } 
}
I am getting the below errors while deploying the trigger to porduction:-


"System.AssertException: Assertion Failed: Expected: 5, Actual: 6  Stack Trace: Class.SObjectUnitOfWorkTest.testUnitOfWorkNewDirtyDelete: line 139, column 1" 

System.AssertException: Assertion Failed: Expected: 5, Actual: 6 
Stack Trace: Class.SObjectUnitOfWorkTest.testUnitOfWorkOverhead: line 237, column 1
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
I have a master detail relationship wherein I have a master custom object named Contact and a detail relationship object Associated Account.
Now , in associated Account there is a field named primary account. One contact can be associated with many accounts but a contact can have only one primary account. So, here I want to write a trigger where whenever a user tries to create a record in associated account the trigger should fire and set all the primary account except the latest one to false(primary account is a checkbox). and the same should be reflected in contact.