• MrBrian
  • NEWBIE
  • 25 Points
  • Member since 2015
  • Director of Analytics

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 17
    Replies
Hello,

I have successfully deployed a big object called "Archived_Tasks__b" in a sandbox instance; I would like to use this object to archive old tasks to, but still be able to view them on a related list or on a visual force page if needed. I found a great resource that I adapted to build a custom controller and visual force page to expose the big object data (https://rajvakati.com/2017/10/19/salesforce-big-objects/ at end of page). However, when I implemented this code, the related list on the account page shows every big object Archived_Tasks __b, not just the ones related to the account.

I have also tried using the "apex:relatedList" code, but this does not seem to be supported for big objects, as every time I try it, I get the message on the account page: "Content cannot be displayed: 'Account_Archived_Tasks__r' is not a valid child relationship name for entity Account". I have tried multiple permutations of the child object name with no luck.

How can I only display the relevant big object records? What if I wanted to show this as a link to a list page instead of a related list (so it doesn't have to load on every account page)?

Page Example:
<apex:page standardController="Sales_Order__c" extensions="BigObjectData">
    <apex:form>
        
        <apex:pageBlock>
            <apex:pageBlockSection title="Big Objects" columns="1">
                <apex:pageBlockTable value="{!boData}" var="bo">
                    <apex:column headerValue="Actual Cost">
                        <apex:outputField value="{!bo.Actual_Cost__c}"/>
                    </apex:column>
                    <apex:column headerValue="Sales Channel">
                        <apex:outputField value="{!bo.Saleschannel__c}"/>
                    </apex:column>
                  
                      <apex:column headerValue="Created from ">
                        <apex:outputField value="{!bo.Created_From__c}"/>
                    </apex:column>
                  
                  
                </apex:pageBlockTable>
            </apex:pageBlockSection>
            
        </apex:pageBlock>
    </apex:form>
</apex:page>

Controller Example: 
public class BigObjectData {
    private  List<Sales_OrderBO__b> orderDetails; 
    public BigObjectData(ApexPages.StandardController con)
    {
        boData = fetchData();
    } 
    public List<Sales_OrderBO__b> fetchData()
    {
        return [Select Id ,Saleschannel__c ,Created_From__c,SalesorderBORel__c,Expired_Date__c,Actual_Cost__c
                from Sales_OrderBO__b ];
    }
    
    public List<Sales_OrderBO__b> boData{get;set;}
    
}

Really appreciate the help!
-Brian
Hello,

I am trying to create a report that shows cumulative install base and then our cumulative returning customers, and then use a formula to get a percentage for each year.

To achieve the cumulative record count for install base and returning customers, I am adding the row counts using parentgroupval:
(RowCount
 +
IF(NOT ISBLANK(PREVGROUPVAL(RowCount, Account.Customer_Since__c,1)),
PREVGROUPVAL(RowCount, Account.Customer_Since__c,1), 0)

... for each column in the report
But when I go to get the percentage, I want my formula to look like this:
Numerator /

PARENTGROUPVAL(
PREVGROUPVAL(Account.Record_Count_Manual__c:SUM, Account.Customer_Since__c)

, ROW_GRAND_SUMMARY, Account.Customer_Since__c)
but I am getting the message: 
Error: Invalid custom summary formula definition: Incorrect argument type for function 'PARENTGROUPVAL()'. .

Am I missing something? Is there a way to use the prevgroupvalue inside the parentgroupval? Or, is there a way to reference another formula as the summary field in parentgroupval?

I appreciate the assistance.

User-added image
Hi there,

I am struggling to create filter criteria a Fast Lookup element in a Visual Flow that I can use in a loop to create some new records.

- I have a custom field on QuoteLineItem called "Group__c" that users can be assigned numeric values to group line items.
- I would like my Visual Flow to loop through each "Group" value and create a "Build Asset" for each group number, where custom objects can be listed.

For example, a quote is created for Item 1 and Item 2. Item 1 consists of A, B and C, and Item 2 consistesns of C, D, and E. The quote is created for six line items, three of which are in group 1 and three are in group 2. My flow, when run, would create 2 "Build Assets" (one for each Group), and then will place A, B, C, C, D, and E into the correct build.

The issue I am having is I can't figure out how to make a list or a fast lookup where the Group__c must be unique. Eg. I need to be able to select one from each group, or create a loop where we say "for each unique group value, create an object". Can this be done with a Flow? Or am I basically looking a trigger to get this sort of filtering? Or, is there another workaround?

Thanks!
Hi there, beginner VF/Apex coder here.

I have a VF email template where the relatedTo object is Asset. I would like to add a VF component that displays a table of all the sibling assets under the same account. Here is my code so far:

Constructor:
public class findSiblingAssets {
    private final List<Asset> assets;

    public Asset ast {get; set;}
    
    public findSiblingAssets() {
        
        assets = [select Id, AccountId, Name, UsageEndDate from Asset where AccountId = :ast.AccountId];
    }

    public List<Asset> getSiblingAssets() {
        return assets;
    }
}
Component (Named "FindSiblingAssets"):
<apex:component controller="findSiblingAssets" access="global">
    <apex:attribute type="Asset" name="originast" assignTo="{!ast}"/>
    <apex:dataTable value="{!SiblingAssets}" var="sib">
        <apex:column >
            <apex:facet name="header">Asset Name</apex:facet>
            {!sib.Name}
        </apex:column>
    </apex:dataTable>

</apex:component>

And here are relevant parts of the email template:
 
<messaging:emailTemplate relatedToType="Asset"
  subject="Subject Line here"
  replyTo="replyaddress@email.com">
  <messaging:htmlEmailBody >
  <html>
...
<c:FindSiblingAssets originast="{!relatedTo}"/>
...
</html>
</messaging:htmlEmailBody> 
</messaging:emailTemplate>


However, after I save the Email Template page, or try to to a test merge, I get the message: "Error occurred trying to load the template for preview: Attempt to de-reference a null object. Please try editing your markup to correct the problem."

I cannot figure out for the life of me what I'm doing wrong! Please help!
Hi! 

I'm trying to create a list button for a custom object the that calls a VisualForce Page, that calls a flow that updated the selected records in a related list. I have had success with this when passing SObjects for standard objects, however, when I try to do the same thing for my custom object Final_Quality_Audit__c, I get an error message on the VF page that seems to indicate that the {!Selected} collection variable does not work here. Here is the screen I get:

User-added image
 
<apex:page standardController="Final_Quality_Audit__c" >
 
    <flow:interview name="Mass_Approve_FQA_Forms" finishLocation="/{!ID}">
        <apex:param name="SObjectFQAForms" value="{!Selected}"/>

    </flow:interview>
</apex:page>

Do I need to "extend" the standard controller for Final_Quality_Audit__c? How do I do that so it supports the {!Selected} functionality?

Thank you!
Brian
Being able to create Account Contact Relationships has been very valuable for our org so that we can relate a single contact to multiple accounts. However, we currently have several lookup fields on the account object for related contacts (filtering eg; Account Decision Maker: Account ID equals Account: Account ID). I would to change these field's to look up an "Account Contact Relationship" instead of a direct contact, so that I can lookup indirect contacts and still meet a simple filter criteria. Another solution would seem to be to adjust my lookup field filter criteria to accept any contacts where any of the related account IDs match the record's ID, however this is not an option currently.

This seems to be a major shortcoming of the new ability to relate contacts to multiple accounts. Am I missing something, or does anyone know of a workaround aside from simply completely removing my lookup field filter?

Thank you.
Hi everyone,

I have a trigger on the Event Object that basically serves as a rollup summary to count the number of certain types of Events that are related to an account, and then display that number on the parent Account. The code seems to work really well, except for when the whatId relationship is changed or removed on the event.

For example, if I have a single Event A where the whatId is Account A, it properly shows on the Account A record that there is 1 child event. However, if I change the whatId relationship to Account B, Account A will not get updated by the trigger on the event, and will still show (falsely) that there is 1 child event on the account.

I believe that I need to add a case for my code using the trigger.old value for the event, however I could really use some guidence on how exactly to account for this case. Here is my current code.
 
/* Provide summary of Number of Site Visit Events on Account record and populates the Site Visit Date field*/

trigger countSiteVisits on Event (after delete, after insert, after undelete, 
after update) {

    Event[] events;
    if (Trigger.isDelete) 
        events = Trigger.old;
    else
        events = Trigger.new;

    // get list of accounts
    Set<ID> acctIds = new Set<ID>();
    for (Event evn : events) {
            acctIds.add(evn.WhatId);
    }
    
    Map<ID, Event> eventsForAccounts = new Map<ID, Event>([select Id
                                                            ,WhatId
                                                            from Event
                                                            where WhatId in :acctIds AND Type ='Site Visit' AND GTM_Status__c = 'Completed' AND isDeleted = FALSE ALL ROWS]);

    Map<ID, Account> acctsToUpdate = new Map<ID, Account>([select Id
                                                                 ,Completed_Site_Visits__c
                                                                  from Account
                                                                  where Id in :acctIds]);
    
    for (Account acct : acctsToUpdate.values()) {
        Set<ID> eventIds = new Set<ID>();
        
        for (Event evn : eventsForAccounts.values()) {
            if (evn.WhatId == acct.Id)
            eventIds.add(evn.Id);
        }
              
        if (acct.Completed_Site_Visits__c != eventIds.size())
            acct.Completed_Site_Visits__c = eventIds.size();
            
        Map<ID, Event> latestEventForAccount = new Map<ID, Event>([SELECT Id, ActivityDate FROM Event
                                                                    WHERE WhatId = :acct.Id AND ID in :eventIds AND Type ='Site Visit' AND GTM_Status__c = 'Completed' AND isDeleted = FALSE ORDER BY ActivityDate DESC LIMIT 1 ALL ROWS]);
        
        for (Event mylatestEvent: latestEventForAccount.values()) {
            if (mylatestEvent.ActivityDate != null)
            acct.Site_Visit_Date__c = mylatestEvent.ActivityDate;
        }
    }

    try {
        update acctsToUpdate.values();
    }
    
    catch (DMLException e) {
        for (event eventCatch: trigger.new) {
            eventCatch.addError(e.getDmlMessage(0));
        }
    }
    catch (Exception e) {
        for (event eventCatch : trigger.new) {
            eventCatch.addError(e.getMessage());
        }
    }
}
Any help appreciated, thank you!
 
Hi SFDC Devs,

I am hoping someone here can help me. I have a set of custom objects to monitor inventory and quality control for my org. On the quality control (QC) record page, I have a custom button that executes some JS that updates all of the individual fields in that record to "Approve All" and thus pass that QC.

However, it is a hassle to have to click into each QC record to approve it, and would save our team some time if the record can be updated from the parent related list but clicking an action or link. I would like to ideally add an action next to delete or edit on the parent related list to "Approve All" that would update that record.

User-added image
I have tried creating an action but I don't think that is the right kind of action in this case. I know I can create a related list button that can execute apex to update all child records here, but I want to be able to specify which QC records get updated.

Can anyone point me in the right direction?

Thank you,
Brian
Hello,

I have created a flow that creates an account, opportunity, quote, and quote line items. The flow is activated via a button that activates a VF page that calls the flow. The flow works without error and generates all of the objects, however the quote line items generated in the list view on the quote show the QLIs as the same incorrect product. Oldly enough though, when the link to the quote line item (or opportunity product) is clicked, it goes to the QLI page displaying all of the correct information!

QLI flow creation:
User-added image

Product names displayed in list view under the quote:
User-added image

But the URL points to the correct QLI with the correct name and information:

User-added image

What is going on here?? A bug?

Any help appreciated, thank you.
Hello,

I have created a flow that creates an account, opportunity, quote, and quote line items. The flow is activated via a button that activates a VF page that calls the flow. The flow works without error and generates all of the objects, however the quote line items generated in the list view on the quote show the QLIs as the same incorrect product. Oldly enough though, when the link to the quote line item (or opportunity product) is clicked, it goes to the QLI page displaying all of the correct information!

QLI flow creation:
User-added image

Product names displayed in list view under the quote:
User-added image

But the URL points to the correct QLI with the correct name and information:

User-added image

What is going on here?? A bug?

Any help appreciated, thank you.
Hi All,

I have a unique problem that I think might be a bug. Last year, I used data loader to create a bunch of events for some historic data. Today, I created a trigger that counts these events that meet criteria. However, I noticed that many of the imported events were not getting counted by the trigger at all. Took the ID for one of these uncounted events and did a query for the event record in the console with the ID taken from the URL: 
select Id from Event where Id ='EVENTIDHERE'
And low and behold, no records where returned.

After fudging around with the record for a while, I was able to make it queryable by changing the StartDate and EndDates to the year 2015 (where before the field was in 2010). Oddly, after making this change, I can query the ID in console, even if I set the StartDate and EndDate years back to 2010.

Has anyone had a similar expereince? I am wordering if there was some kind of bug with the mass upsert of Events, or if there is something that I am not understanding about archiving? I cannot tell if these even are archived, because I cannot query them, so I do not have access to the field "isArchived".

Any ideas?

Thanks,
Brian
 
Hello,

I am trying to create a report that shows cumulative install base and then our cumulative returning customers, and then use a formula to get a percentage for each year.

To achieve the cumulative record count for install base and returning customers, I am adding the row counts using parentgroupval:
(RowCount
 +
IF(NOT ISBLANK(PREVGROUPVAL(RowCount, Account.Customer_Since__c,1)),
PREVGROUPVAL(RowCount, Account.Customer_Since__c,1), 0)

... for each column in the report
But when I go to get the percentage, I want my formula to look like this:
Numerator /

PARENTGROUPVAL(
PREVGROUPVAL(Account.Record_Count_Manual__c:SUM, Account.Customer_Since__c)

, ROW_GRAND_SUMMARY, Account.Customer_Since__c)
but I am getting the message: 
Error: Invalid custom summary formula definition: Incorrect argument type for function 'PARENTGROUPVAL()'. .

Am I missing something? Is there a way to use the prevgroupvalue inside the parentgroupval? Or, is there a way to reference another formula as the summary field in parentgroupval?

I appreciate the assistance.

User-added image
Hi there,

I am struggling to create filter criteria a Fast Lookup element in a Visual Flow that I can use in a loop to create some new records.

- I have a custom field on QuoteLineItem called "Group__c" that users can be assigned numeric values to group line items.
- I would like my Visual Flow to loop through each "Group" value and create a "Build Asset" for each group number, where custom objects can be listed.

For example, a quote is created for Item 1 and Item 2. Item 1 consists of A, B and C, and Item 2 consistesns of C, D, and E. The quote is created for six line items, three of which are in group 1 and three are in group 2. My flow, when run, would create 2 "Build Assets" (one for each Group), and then will place A, B, C, C, D, and E into the correct build.

The issue I am having is I can't figure out how to make a list or a fast lookup where the Group__c must be unique. Eg. I need to be able to select one from each group, or create a loop where we say "for each unique group value, create an object". Can this be done with a Flow? Or am I basically looking a trigger to get this sort of filtering? Or, is there another workaround?

Thanks!
Hi there, beginner VF/Apex coder here.

I have a VF email template where the relatedTo object is Asset. I would like to add a VF component that displays a table of all the sibling assets under the same account. Here is my code so far:

Constructor:
public class findSiblingAssets {
    private final List<Asset> assets;

    public Asset ast {get; set;}
    
    public findSiblingAssets() {
        
        assets = [select Id, AccountId, Name, UsageEndDate from Asset where AccountId = :ast.AccountId];
    }

    public List<Asset> getSiblingAssets() {
        return assets;
    }
}
Component (Named "FindSiblingAssets"):
<apex:component controller="findSiblingAssets" access="global">
    <apex:attribute type="Asset" name="originast" assignTo="{!ast}"/>
    <apex:dataTable value="{!SiblingAssets}" var="sib">
        <apex:column >
            <apex:facet name="header">Asset Name</apex:facet>
            {!sib.Name}
        </apex:column>
    </apex:dataTable>

</apex:component>

And here are relevant parts of the email template:
 
<messaging:emailTemplate relatedToType="Asset"
  subject="Subject Line here"
  replyTo="replyaddress@email.com">
  <messaging:htmlEmailBody >
  <html>
...
<c:FindSiblingAssets originast="{!relatedTo}"/>
...
</html>
</messaging:htmlEmailBody> 
</messaging:emailTemplate>


However, after I save the Email Template page, or try to to a test merge, I get the message: "Error occurred trying to load the template for preview: Attempt to de-reference a null object. Please try editing your markup to correct the problem."

I cannot figure out for the life of me what I'm doing wrong! Please help!
Being able to create Account Contact Relationships has been very valuable for our org so that we can relate a single contact to multiple accounts. However, we currently have several lookup fields on the account object for related contacts (filtering eg; Account Decision Maker: Account ID equals Account: Account ID). I would to change these field's to look up an "Account Contact Relationship" instead of a direct contact, so that I can lookup indirect contacts and still meet a simple filter criteria. Another solution would seem to be to adjust my lookup field filter criteria to accept any contacts where any of the related account IDs match the record's ID, however this is not an option currently.

This seems to be a major shortcoming of the new ability to relate contacts to multiple accounts. Am I missing something, or does anyone know of a workaround aside from simply completely removing my lookup field filter?

Thank you.
Hi everyone,

I have a trigger on the Event Object that basically serves as a rollup summary to count the number of certain types of Events that are related to an account, and then display that number on the parent Account. The code seems to work really well, except for when the whatId relationship is changed or removed on the event.

For example, if I have a single Event A where the whatId is Account A, it properly shows on the Account A record that there is 1 child event. However, if I change the whatId relationship to Account B, Account A will not get updated by the trigger on the event, and will still show (falsely) that there is 1 child event on the account.

I believe that I need to add a case for my code using the trigger.old value for the event, however I could really use some guidence on how exactly to account for this case. Here is my current code.
 
/* Provide summary of Number of Site Visit Events on Account record and populates the Site Visit Date field*/

trigger countSiteVisits on Event (after delete, after insert, after undelete, 
after update) {

    Event[] events;
    if (Trigger.isDelete) 
        events = Trigger.old;
    else
        events = Trigger.new;

    // get list of accounts
    Set<ID> acctIds = new Set<ID>();
    for (Event evn : events) {
            acctIds.add(evn.WhatId);
    }
    
    Map<ID, Event> eventsForAccounts = new Map<ID, Event>([select Id
                                                            ,WhatId
                                                            from Event
                                                            where WhatId in :acctIds AND Type ='Site Visit' AND GTM_Status__c = 'Completed' AND isDeleted = FALSE ALL ROWS]);

    Map<ID, Account> acctsToUpdate = new Map<ID, Account>([select Id
                                                                 ,Completed_Site_Visits__c
                                                                  from Account
                                                                  where Id in :acctIds]);
    
    for (Account acct : acctsToUpdate.values()) {
        Set<ID> eventIds = new Set<ID>();
        
        for (Event evn : eventsForAccounts.values()) {
            if (evn.WhatId == acct.Id)
            eventIds.add(evn.Id);
        }
              
        if (acct.Completed_Site_Visits__c != eventIds.size())
            acct.Completed_Site_Visits__c = eventIds.size();
            
        Map<ID, Event> latestEventForAccount = new Map<ID, Event>([SELECT Id, ActivityDate FROM Event
                                                                    WHERE WhatId = :acct.Id AND ID in :eventIds AND Type ='Site Visit' AND GTM_Status__c = 'Completed' AND isDeleted = FALSE ORDER BY ActivityDate DESC LIMIT 1 ALL ROWS]);
        
        for (Event mylatestEvent: latestEventForAccount.values()) {
            if (mylatestEvent.ActivityDate != null)
            acct.Site_Visit_Date__c = mylatestEvent.ActivityDate;
        }
    }

    try {
        update acctsToUpdate.values();
    }
    
    catch (DMLException e) {
        for (event eventCatch: trigger.new) {
            eventCatch.addError(e.getDmlMessage(0));
        }
    }
    catch (Exception e) {
        for (event eventCatch : trigger.new) {
            eventCatch.addError(e.getMessage());
        }
    }
}
Any help appreciated, thank you!
 
Hi SFDC Devs,

I am hoping someone here can help me. I have a set of custom objects to monitor inventory and quality control for my org. On the quality control (QC) record page, I have a custom button that executes some JS that updates all of the individual fields in that record to "Approve All" and thus pass that QC.

However, it is a hassle to have to click into each QC record to approve it, and would save our team some time if the record can be updated from the parent related list but clicking an action or link. I would like to ideally add an action next to delete or edit on the parent related list to "Approve All" that would update that record.

User-added image
I have tried creating an action but I don't think that is the right kind of action in this case. I know I can create a related list button that can execute apex to update all child records here, but I want to be able to specify which QC records get updated.

Can anyone point me in the right direction?

Thank you,
Brian
Hi,

We are using Talend middleware to integrate and exchange data between our internal systems and SF using SF API. The SF CRM is acting as a 'slave' while our system database is a master.  So, almost every object in SF has an external ID that maches the record in our DB. 

All our 'upserts' works fine when matched on External ID. But in this case, we need to update - not upsert - the record in SF using External ID, which is marked as unique in SF. 

But, when runing the code this is the error: MISSING_ARGUMENT:Id not specified in an update call - for every single record regardles if the External ID already exist in SF or not.

So, my question is - can update be done on External ID or it must be the SF Id ?

Thanks


 
Hello,

I have created a flow that creates an account, opportunity, quote, and quote line items. The flow is activated via a button that activates a VF page that calls the flow. The flow works without error and generates all of the objects, however the quote line items generated in the list view on the quote show the QLIs as the same incorrect product. Oldly enough though, when the link to the quote line item (or opportunity product) is clicked, it goes to the QLI page displaying all of the correct information!

QLI flow creation:
User-added image

Product names displayed in list view under the quote:
User-added image

But the URL points to the correct QLI with the correct name and information:

User-added image

What is going on here?? A bug?

Any help appreciated, thank you.
Hi All,

I have a unique problem that I think might be a bug. Last year, I used data loader to create a bunch of events for some historic data. Today, I created a trigger that counts these events that meet criteria. However, I noticed that many of the imported events were not getting counted by the trigger at all. Took the ID for one of these uncounted events and did a query for the event record in the console with the ID taken from the URL: 
select Id from Event where Id ='EVENTIDHERE'
And low and behold, no records where returned.

After fudging around with the record for a while, I was able to make it queryable by changing the StartDate and EndDates to the year 2015 (where before the field was in 2010). Oddly, after making this change, I can query the ID in console, even if I set the StartDate and EndDate years back to 2010.

Has anyone had a similar expereince? I am wordering if there was some kind of bug with the mass upsert of Events, or if there is something that I am not understanding about archiving? I cannot tell if these even are archived, because I cannot query them, so I do not have access to the field "isArchived".

Any ideas?

Thanks,
Brian
 
Hello,

We are implementing Data archival pilot in our ORG. I was able to create big objects and was able to load data into those. 

Now how do I view this data? How can I create reports and list views for this object.

Thanks in advance.
Need help on creating an apex trigger. This trigger will need to notify me via email when a Lead with a certain picklist value is deleted from Salesforce from our users. Here are the core details: 

Lead Record  Type: Lead MF
Picklist API: Lead Source
Picklist Value: BODY Meters

so, if the Lead Record Type is Lead MF and the Picklist Lead Source with the picklist value BODY Meters is selected and a user deletes this lead, I want the ability to receive an email of the Lead being deleted. 

thanks!

 

All,

 

I need to create trigger to count the number of open cases on an account.  I need to display this information on the account page.

 

Thanks for the help,

 

Michael

I want to automatically convert new leads into contacts. I have a trigger on Lead after update that will bulk convert 100 leads at a time. The problem I have  is that my marketing automation tool pushes new leads into Salesforce in batches of 200 at a time. When I try to import 200 leads, the bulk convert fails due to a too many DML 151 error.

 

I read that the convertlead function can only handle 100 records at a time. How can I edit the code to handle 200 imports at a time? Is it possible?

 

Thanks in advance.

 

trigger AutoConvert on Lead (after update) {

for(Lead myLead: Trigger.new){ if(Trigger.new[0].isConverted == false) { Database.LeadConvert lc = new database.LeadConvert(); lc.setLeadId(myLead.Id); lc.convertedStatus = 'Qualified'; //Database.ConvertLead(lc,true); lc.setDoNotCreateOpportunity(true); Database.LeadConvertResult lcr = Database.convertLead(lc); System.assert(lcr.isSuccess()); }}}

 

When we use standard salesforce logo, the header color is blue.

But when we use custom logo for an app, the header color changes to white?

How can we control on this difference? I want to change the header color, as well as the background color of an app? how to do it??


Thanks and Regards,
Devendra S


Hi all,

 

I have a custom object (Contract_Line__c) that has a Master-Detail field (back to Contract). I'm making some changes to my code and no longer want that relationship there - in fact, I want a lookup relationship in its place.

 

I have it working in the sandbox - I was able to change my code (and unit tests that use that field), then remove the master-detail field from my custom object.

 

However - I am not able to deploy the solution because the unit tests no longer populate the Contract__c field which is a master-detail field and therefore mandatory.

I also cannot delete the field in production because 27 apex classes reference it.

I can't change the apex classes because I am unable to deploy the classes (see above).

 

I'm out of options - all I want to do is delete one field from a custom object!!!

 

Please help - I'm tearing my hair out!

 

Andy

 

 

I got an error message :

Attempting to update (as part of an upsert) parent field obj__c with new value a0740000002T9LgAAK, current value is a0740000002T9LmAAK116

  • February 05, 2009
  • Like
  • 0