RSS

Tag Archives: customer

Sales Orders are missing or disappear while others still can see

Issues

After creating a SO, you don’t see SOs but others can see SOs.

image

Let’s take a look at my current setup why I can’t view my Sales Orders

SETUP

1.  Create a new worker or  use an existing worker

Human resources/Common/Workers/Workers

image

2.  Associate current user with worker

System administration/Common/Users/Users

image

3. View “My contacts”

Once the Worker is associated with my name. Go check “My contacts”  (Sales and marketing/Common/Contacts/My contacts), I should not see any records because this is a brand new Worker

image

4. Associate Customer/Vendor contact to Worker

Attempt to link Contact (Vendor or Customer) to Worker. Pick either Customer or Vendor route

Pick a customer

image

Chose the worker I create, select and Save the contact.

image

Or Pick a Vendor

image

4. View “My contact” to make sure “Customer” was added for this worker

Sales and marketing/Common/Contacts/My contacts

image

5.  Now View Sales Order. All the SOs are gone

image

BEFORE: There are many SOs

image

Conclusion

This issue actually is by designed. The reason for this is because contacts related to customers/vendors are meant to be external. External vendors/customers should not see Sales Order that are created internally.

How to make SOs visible?

1. Delete associated worker

image

2.  Delete or Deactivate contacts

In some scenarios, a user needs to be an employee, we can’t delete associated worker. We can  deactivate contact or delete contact

Sales and marketing/Common/Contacts/My contacts
image

 
Leave a comment

Posted by on February 27, 2015 in Development

 

Tags: , , , ,

How to update/edit customer addresses with additional address purposes?

Requirements:  Needs to update all customer addresses with a delivery purpose to also have an invoice purpose.

image

image

Solution:
This job below will update every customer’s address which has purpose Delivery with additional Invoice purpose. We can extent this to update/edit vendor address as well.

static void updateCustomerPostalAddresses(Args _args)
{
    #define.Delivery("Delivery")
    CustTable custTable;
    DirPartyPostalAddressView   addressView;
    LogisticsPostalAddress      postalAddress;
    DirPartyLocationEntity      partyLocationEntity;
    container purposes;
    int counter;
    
    ttsBegin;
    setPrefix("Update Customer addresses:");
    // Iterate every customer    
    while select * from custTable        
    {
        setPrefix(strFmt("Customer: %1", custTable.AccountNum));
        {
            // Iterate every addresses every customer has
            while select addressView
                where addressView.Party == custTable.Party
            {
                if(strScan(addressView.locationRoles(), #Delivery, 1, strLen(addressView.locationRoles())))
                {
                    if (DirPartyLocation::findByPartyLocation(addressView.Party, addressView.Location))
                    {
                        postalAddress = LogisticsPostalAddress::findByLocation(addressView.Location, true);
                        if (postalAddress.RecId > 0)
                        {
                            partyLocationEntity = DirPartyLocationEntity::construct(addressView.Party);
                            partyLocationEntity.parmLocation(postalAddress.Location);
                        
                            purposes = [LogisticsLocationRole::findBytype(LogisticsLocationRoleType::Invoice).RecId];
                                                
                            // Create party links
                            partyLocationEntity.createPartyLocationAssociation(purposes, addressView.IsPrimary, addressView.IsPrivate);
                            info(strFmt("Update address: %1",  addressView.Address));
                            counter++;
                        }
                    }                
                }
            }
        }            
    }
    
    info(strFmt("Total address(es) updated: %1", counter));
    ttsCommit;
}

Result:

image

image

 
Leave a comment

Posted by on March 25, 2014 in Development

 

Tags: , , ,

 
%d bloggers like this: